3 Replies Latest reply on Dec 9, 2010 10:29 AM by Stéphane Pain

    [Fuse 4.3.0] Camel xPath expression : ClassCastException

    Stéphane Pain Newbie

      Hi,

       

         In my camel-context.xml file, I have a route with :

       

       

       

      The problem is when my http consumer send the message to this route, I have the exception :

       

      java.lang.ClassCastException: javax.xml.transform.stream.StreamSource cannot be cast to org.w3c.dom.Node

           at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:116)[:1.6.0_07]

           at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:98)[:1.6.0_07]

           at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:180)[:1.6.0_07]

           at org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:598)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:570)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:122)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:61)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:290)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:202)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:143)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:78)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]

           at org.apache.servicemix.camel.CamelProviderEndpoint$1.call(CamelProviderEndpoint.java:109)[142:servicemix-camel:2010.02.0.fuse-00-00]

           at org.apache.servicemix.camel.JbiBinding.runWithCamelContextClassLoader(JbiBinding.java:116)[142:servicemix-camel:2010.02.0.fuse-00-00]

           at org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:107)[142:servicemix-camel:2010.02.0.fuse-00-00]

           at org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:85)[142:servicemix-camel:2010.02.0.fuse-00-00]

           at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)[90:servicemix-common:2010.02.0.fuse-00-00]

           at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:571)[90:servicemix-common:2010.02.0.fuse-00-00]

           at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:468)[90:servicemix-common:2010.02.0.fuse-00-00]

           at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)[90:servicemix-common:2010.02.0.fuse-00-00]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)[:1.6.0_07]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)[:1.6.0_07]

           at java.lang.Thread.run(Thread.java:619)[:1.6.0_07]

       

      Could you help me ?

       

      Thank you