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

Creating an InputStream from XMLStreamReader fails with ASCII default platform encoding

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.17.2
    • Fix Version/s: 2.17.3, 2.18.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown
    • Regression:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: