You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Stephan Siano (JIRA)" <ji...@apache.org> on 2016/07/04 13:35:11 UTC
[jira] [Resolved] (CAMEL-10120) Creating an InputStream from
XMLStreamReader fails without default namespace
[ https://issues.apache.org/jira/browse/CAMEL-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephan Siano resolved CAMEL-10120.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.18.0
2.17.3
> 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
> Fix For: 2.17.3, 2.18.0
>
>
> 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)