Sebastian Bösl created CAMEL-7025:
-------------------------------------
Summary: StaxConverter throws NPE
Key: CAMEL-7025
URL: https://issues.apache.org/jira/browse/CAMEL-7025
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.12.2
Environment: Weblogic 10
Reporter: Sebastian Bösl
This issue only happens when running in weblogic:
After updating to Camel 2.12.2 the method createXMLStreamReader(InputStream in,
Exchange exchange) in staxConverter throws an NPE because of the missing
charsetName.
Comparing the class with the previous version I saw camel no longer falls back
to the default charset.
As a workaround I set the property Exchange.CHARSET_NAME on explicitly ->
still the same error.
Debugging the code I noticed that in
org.apache.camel.impl.converter.BaseTypeConverterRegistry#convertTo line 98 the
exchange is not passed to the converter so I can neither use an explicit nor
an implicit charset.
Any workaround/fix would be greatly appreciated!
StackTrace:
java.lang.NullPointerException: charsetName
at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
at
weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:66)
at
org.apache.camel.converter.jaxp.StaxConverter.createXMLStreamReader(StaxConverter.java:170)
at sun.reflect.GeneratedMethodAccessor85614.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:990)
at
org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:78)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:275)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:113)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:98)
at
org.apache.camel.converter.jaxb.JaxbDataFormat.unmarshal(JaxbDataFormat.java:173)
--
This message was sent by Atlassian JIRA
(v6.1#6144)