Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14853

camel-jacksonxml classpath conflict

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.3.0
    • Component/s: camel-jacksonxml
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Hi. I'm using Spring Boot (2.2.4.RELEASE) with Camel (3.1.0) and I've come across the following error. I should note that i'm having a hard time reproducing this issue.

      ***************************
      APPLICATION FAILED TO START
      ***************************
      
      Description:
      
      An attempt was made to call a method that does not exist. The attempt was made from the following location:
      
          com.ctc.wstx.evt.CompactStartElement.getAttributes(CompactStartElement.java:94)
      
      The following method did not exist:
      
          'org.codehaus.stax2.ri.EmptyIterator org.codehaus.stax2.ri.EmptyIterator.getInstance()'
      
      The method's class, org.codehaus.stax2.ri.EmptyIterator, is available from the following locations:
      
          jar:file:/app/libs/stax2-api-4.2.jar!/org/codehaus/stax2/ri/EmptyIterator.class
      
      It was loaded from the following location:
      
          file:/app/libs/stax2-api-4.2.jar
      
      
      Action:
      
      Correct the classpath of your application so that it contains a single, compatible version of org.codehaus.stax2.ri.EmptyIterator
      

      I was wondering if this is related to the fact that camel-jacksonxml introduces both org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1 and com.fasterxml.woodstox:woodstox-core:jar:6.0.3 on the classpath , as seen below.

      INFO] +- org.apache.camel.springboot:camel-jacksonxml-starter:jar:3.1.0:compile
      [INFO] |  \- org.apache.camel:camel-jacksonxml:jar:3.1.0:compile
      [INFO] |     +- org.apache.camel:camel-support:jar:3.1.0:compile
      [INFO] |     +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.10.2:compile
      [INFO] |     |  +- org.codehaus.woodstox:stax2-api:jar:4.2:compile
      [INFO] |     |  \- com.fasterxml.woodstox:woodstox-core:jar:6.0.3:compile
      [INFO] |     +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.10.2:compile
      [INFO] |     \- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
      

      It's unclear to me why camel-jacksonxml has a dependency on woodstox-core-asl while woodstox-core is already available, albeit transitively.

        Attachments

          Activity

            People

            • Assignee:
              acosentino Andrea Cosentino
              Reporter:
              MaartenTutak Maarten Tutak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: