[
https://issues.apache.org/jira/browse/CAMEL-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephan Siano reassigned CAMEL-10120:
-------------------------------------
Assignee: Stephan Siano
> Creating an InputStream from XMLStreamReader fails without default namespace
> ----------------------------------------------------------------------------
>
> Key: CAMEL-10120
> URL: https://issues.apache.org/jira/browse/CAMEL-10120
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.17.2
> Reporter: Stephan Siano
> Assignee: Stephan Siano
> Priority: Trivial
>
> The XMLStreamReaderInputStream created by the StaxConverter will fail if the
> document does not define a default namespace, a tag contains an attribute
> without namespace prefix and the XMLStreamWriter from the JDK is used.
> The error message is:
> javax.xml.stream.XMLStreamException: NamespaceURI cannot be null
> at
> com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:615)
> at
> org.apache.camel.converter.jaxp.XMLStreamReaderInputStream.ensureBuffering(XMLStreamReaderInputStream.java:106)
> The fix is relatively simple: a check needs to be introduced that replaces
> null namespaceUris with empty namespace Uris.
> The issue was introduced with CAMEL-10070.
> The issue will not happen with unit tests because those use the woodstox Stax
> parser.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)