camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Siano (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-10120) Creating an InputStream from XMLStreamReader fails without default namespace
Date Mon, 04 Jul 2016 13:35:11 GMT

     [ 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)

Mime
View raw message