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

XQuery component does not work with StAXSource out of the box

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.2
    • 2.8.3, 2.9.0
    • camel-saxon
    • None
    • Unknown

    Description

      The new STaXSource type converters cause camel-saxon to fail unit tests as reported by CI servers

      Caused by: net.sf.saxon.trans.XPathException: Unknown source class
      at net.sf.saxon.Configuration.buildDocument(Configuration.java:2892)
      at net.sf.saxon.query.StaticQueryContext.buildDocument(StaticQueryContext.java:211)
      at org.apache.camel.component.xquery.XQueryBuilder.createDynamicContext(XQueryBuilder.java:474)

      We should implement the same optimized logic as we did today in XSLT to convert to Source if StAX is allowed, as well to avoid leaking resources we need to ensure if InputStream is in use, we should ensure it gets closed.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: