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

camel-saxon - dump namespaces may cause a ClassCastException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.21.0
    • Component/s: camel-saxon
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Noticed this from the test logs

      2018-01-12 10:43:29,972 [main ] INFO XPathLanguageTest - ********************************************************************************
      2018-01-12 10:43:29,972 [main ] INFO XPathLanguageTest - Testing: testSpringDSLXPathSaxonFlag(org.apache.camel.language.xpath.XPathLanguageTest)
      2018-01-12 10:43:29,972 [main ] INFO XPathLanguageTest - ********************************************************************************
      2018-01-12 10:43:30,126 [main ] INFO SpringCamelContext - Apache Camel 2.21.0-SNAPSHOT (CamelContext: camel-7) is starting
      2018-01-12 10:43:30,126 [main ] INFO DefaultManagementStrategy - JMX is disabled
      2018-01-12 10:43:30,129 [main ] INFO DefaultTypeConverter - Type converters loaded (core: 193, classpath: 5)
      2018-01-12 10:43:30,144 [main ] INFO SpringCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
      2018-01-12 10:43:30,146 [main ] INFO XPathBuilder - Using objectModelUri http://saxon.sf.net/jaxp/xpath/om when created XPathFactory net.sf.saxon.xpath.XPathFactoryImpl@6b63e6ad
      2018-01-12 10:43:30,147 [main ] INFO SpringCamelContext - Route: route13 started and consuming from: direct://testSaxonWithFlag
      2018-01-12 10:43:30,147 [main ] INFO SpringCamelContext - Route: route14 started and consuming from: direct://testSaxonWithFactory
      2018-01-12 10:43:30,147 [main ] INFO SpringCamelContext - Route: route15 started and consuming from: direct://testSaxonWithFlagPredicate
      2018-01-12 10:43:30,147 [main ] INFO SpringCamelContext - Route: route16 started and consuming from: direct://testSaxonWithFactoryPredicate
      2018-01-12 10:43:30,148 [main ] INFO SpringCamelContext - Total 4 routes, of which 4 are started
      2018-01-12 10:43:30,148 [main ] INFO SpringCamelContext - Apache Camel 2.21.0-SNAPSHOT (CamelContext: camel-7) started in 0.022 seconds
      2018-01-12 10:43:30,149 [main ] INFO XPathBuilder - Using objectModelUri http://saxon.sf.net/jaxp/xpath/om when created XPathFactory net.sf.saxon.xpath.XPathFactoryImpl@17410c07
      2018-01-12 10:43:30,149 [main ] INFO XPathBuilder - Creating new XPath expression in pool. Namespaces on XPath expression: [me:

      {system -> http://camel.apache.org/xml/variables/system-properties}

      ,

      {in -> http://camel.apache.org/xml/in/}

      ,

      {function -> http://camel.apache.org/xml/function/}

      ,

      {env -> http://camel.apache.org/xml/variables/environment-variables}

      ,

      {out -> http://camel.apache.org/xml/out/}

      ,

      {xsi -> http://www.w3.org/2001/XMLSchema-instance}

      ], [parent: net.sf.saxon.xpath.JAXPXPathStaticContext$MinimalNamespaceContext@6ee99964]
      2018-01-12 10:43:30,156 [main ] WARN XPathBuilder - Unable to trace discovered namespaces in XPath expression
      java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.w3c.dom.NodeList
      at org.apache.camel.builder.xml.XPathBuilder.logNamespaces(XPathBuilder.java:885) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:847) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:819) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:181) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.processor.SetBodyProcessor.process(SetBodyProcessor.java:49) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]
      at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) [camel-core-2.21.0-SNAPSHOT.jar:2.21.0-SNAPSHOT]

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: