jersey
  1. jersey
  2. JERSEY-769

jersey-json has multiple dependencies on stax-api, breaks deployment in some circumstances

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7, 1.8, 1.9
    • Fix Version/s: 1.15
    • Component/s: media
    • Labels:
      None
    • Environment:

      Linux / Weblogic 10.3

      Description

      I'm deploying an application (maven built) that produces both XML and JSON data using the jersey-json module. Deploying the application on WebLogic with the <prefer-web-inf-classes> flag set causes a LinkageError due to multiple instances of the javax.xml.namespace.QName class being found. Looking inside the war file I can see a "stax 1.0.1" module that carries its own instance of QName, and is included transitively by jersey-json via a dependency on the jettison module. The same jersey-json module depends on the "stax 1.0-2" package (via the jaxb-impl dependency) that causes no issues. Shouldn't jersey depend just on the "stax 1.0-2" module, since QName has been part of the standard library for ages?

        Issue Links

          Activity

          Hide
          Jakub Podlesak added a comment -

          Right, we should exclude the transitive stax:stax-api:1.0.1 dependency from Jettison:

          [INFO] — maven-dependency-plugin:2.1:tree (default-cli) @ jersey-json —
          [INFO] com.sun.jersey:jersey-json:jar:1.13-SNAPSHOT
          [INFO] +- org.codehaus.jettison:jettison:jar:1.1:compile
          [INFO] | - stax:stax-api:jar:1.0.1:compile
          [INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
          [INFO] | - javax.xml.bind:jaxb-api:jar:2.2.2:compile
          [INFO] | +- javax.xml.stream:stax-api:jar:1.0-2:compile
          [INFO] | - javax.activation:activation:jar:1.1:compile
          [INFO] +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:compile
          [INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:compile
          [INFO] +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:compile
          [INFO] +- org.codehaus.jackson:jackson-xc:jar:1.9.2:compile
          [INFO] +- junit:junit:jar:4.8.2:test
          [INFO] - com.sun.jersey:jersey-core:jar:1.13-SNAPSHOT:compile

          Show
          Jakub Podlesak added a comment - Right, we should exclude the transitive stax:stax-api:1.0.1 dependency from Jettison: [INFO] — maven-dependency-plugin:2.1:tree (default-cli) @ jersey-json — [INFO] com.sun.jersey:jersey-json:jar:1.13-SNAPSHOT [INFO] +- org.codehaus.jettison:jettison:jar:1.1:compile [INFO] | - stax:stax-api:jar:1.0.1:compile [INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile [INFO] | - javax.xml.bind:jaxb-api:jar:2.2.2:compile [INFO] | +- javax.xml.stream:stax-api:jar:1.0-2:compile [INFO] | - javax.activation:activation:jar:1.1:compile [INFO] +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:compile [INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:compile [INFO] +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:compile [INFO] +- org.codehaus.jackson:jackson-xc:jar:1.9.2:compile [INFO] +- junit:junit:jar:4.8.2:test [INFO] - com.sun.jersey:jersey-core:jar:1.13-SNAPSHOT:compile
          Hide
          Jakub Podlesak added a comment -

          Fixed in Jersey 1 main trunk.

          Show
          Jakub Podlesak added a comment - Fixed in Jersey 1 main trunk.

            People

            • Assignee:
              Jakub Podlesak
              Reporter:
              agnul
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: