Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Information Provided
-
4.4.1
-
None
-
Unknown
-
Regression
Description
When upgrading a JAXB+CXF application from Camel 4.x to Camel 4.4.x we encountered a `jakarta.xml.bind.UnmarshalException` with a linked exception of `com.sun.istack.SAXParseException2` Namespace URIs and local names to the unmarshaller needs to be interned.
Through bisection, we believe this change happens after the changes in Camel-14028 .
When the inbound data in a CxfCachedPayload object is converted with the new non-stream cast unmarshal(), the method attempts to find a TypeConverter fail repeatedly until a fallback CXF converter is found that instantiates a WstxDOMWrappingReader (instance of XmlStreamReader) - however this one has a flag _cfgInternNames set to false which causes the exception above to be thrown.
When we force the code to flow into the old InputStream path, we end up in `camel.converter.jaxp` where factory methods create a ValidatingStreamReader (instance of XmlStreamReader) to read a ByteArrayInputStream.
The latter object contains the flag mInternStrings=true and works as in previous iterations of Camel.
To continue working as before, the WstxDOMWrappingReader needs interning to be activated or have the CXFCachedPayload handled by the jaxp logic
Attachments
Attachments
Issue Links
- relates to
-
CAMEL-14028 Allow DataFormats to unmarshal known data formats without first converting to bytes
- Resolved