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

Validation using JAXB format is not thread safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.1
    • 2.11.2, 2.12.0
    • camel-core
    • None
    • Moderate

    Description

      I'm using JAXB format for unmarshaling. It is defined like this:

      <dataFormats>
      <jaxb id="kofax" contextPath="com.indracompany.telefonica.assignmanager"
      schema="classpath:DocumentsDataForAssignManager.xsd"/>
      </dataFormats>

      And used in route like this:

      <unmarshal ref="kofax"/>

      Sometimes however I get following exception:

      org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
      at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXException(Util.java:65) ~[na:1.7.0_21]
      at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:244) ~[na:1.7.0_21]
      at org.apache.camel.converter.jaxb.JaxbDataFormat.createUnmarshaller(JaxbDataFormat.java:347) ~[camel-jaxb-2.11.1.jar:2.11.1]
      at org.apache.camel.converter.jaxb.JaxbDataFormat.unmarshal(JaxbDataFormat.java:171) ~[camel-jaxb-2.11.1.jar:2.11.1]
      at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:57) ~[camel-core-2.11.1.jar:2.11.1]

      Seems that the problem is same as in CAMEL-1565. That ticket was however related to <validate> element.

      Right now I have disabled validation on the jaxb format used for unmarshalling and put extra <validate> in the route. It would be however fine to have this issue fixed as well.

      Attachments

        Activity

          People

            muellerc Christian Müller
            ales_d Ales Dolecek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified