Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10111

Creating an InputStream from XMLStreamReader fails with ASCII default platform encoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.17.2
    • 2.17.3, 2.18.0
    • camel-core
    • None
    • Unknown
    • Regression

    Description

      If a type conversion is performed between XMLStreamReader and the platform default encoding is not UTF-8 and the used Stax parser is the one from the JDK the conversion will fail.

      The error message will look like that:
      Caused by: javax.xml.stream.XMLStreamException: Underlying stream encoding 'ASCII' and input paramter for writeStartDocument() method 'utf-8' do not match.

      The underlying issue was introduced with CAMEL-10070 and CAMEL-10080.

      Unfortunately this cannot be unit tested, as in the unit tests the default platform encoding is UTF-8 and the used Stax parser is woodstox. Both conditions prevent the issue from occuring.

      Attachments

        Activity

          People

            siano Stephan Siano
            siano Stephan Siano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: