4 Replies Latest reply on Feb 16, 2011 10:30 AM by Scott Prater

    Camel, Spring, routeContextRef and namespaces?

    Scott Prater Newbie

      Crossposted to the camel-users list...

       

      I'm running into message namespace problems that cause a runtime error when including and evaluating a camel route.  At the bottom of this message is a stack trace of the error that is generated when a JMS message is received.

       

      Here is my camel-context.xml snippet:

       

         element, to no avail.  I also tried it without the "atom" namespace at all, neither declared in the camelContext xmlns attribute nor specified in the xpath query:  then the choices were just silently passed over, as if nothing matched (which leads me to conclude it might be a namespace issue).

       

      I've seen how to add namespaces using the Camel Java DSL, but are there other ways to do it using the spring XML configuration?

       

      thanks in advance,

       

      -- Scott

       

      Partial Stack trace:

       

      EndpointMessageListener        ERROR Caused by: org.apache.camel.builder.xml.InvalidXPathExpression - Invalid xpath: /atom:entry/atom:summary. Reason: javax.xml.xpath.XPathExpressionException

      org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: /atom:entry/atom:summary. Reason: javax.xml.xpath.XPathExpressionException

      at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:621)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:602)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:131)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.builder.ProcessorBuilder$4.process(ProcessorBuilder.java:96)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

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

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

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

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

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

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

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

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

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

      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

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

      at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

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

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

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

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

      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)[camel-core-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:92)[camel-jms-2.6.0-fuse-00-00.jar:2.6.0-fuse-00-00]

      at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)[spring-jms-3.0.5.RELEASE.jar:3.0.5.RELEASE]

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