Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.2
-
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.