camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Arias Losada <javier.ari...@gmail.com>
Subject error in interceptor: InputStreamCache cannot be cast to org.w3c.dom.Node
Date Mon, 30 May 2011 11:37:44 GMT
Hello all,

I am implementing a monitor on my routes, using an interceptor. I am using
Camel 2.3.0 inside Servicemix 3.3.2.
The routes are working ok without the interceptor.
In the monitor, I try to log the message, but it seems (not sure about this,
just a guess) that that is causing the InputStream to be read and then It
seems that it can not be read again.
I am already using getContext().setStreamCaching(true); in my routes.
Below, you can see the stack trace, any comments or help on this will be
welcome.

Thank you in advance.
Javier Arias.

[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :-1:-1: Premature end of file.
20110530-12:58:52.213 | ERROR | DefaultMessageListenerContainer-1 |
he.camel.processor.Logger  248 | Failed delivery for exchangeId:
ID:COMMSPRE-39182-1306750664774-2:48:1:1:1. Exhausted after delivery
attempt: 5 caught: java.lang.ClassCastException:
org.apache.camel.converter.stream.InputStreamCache cannot be cast to
org.w3c.dom.Node. Processed by failure processor:
sendTo(Endpoint[activemq://deadletterq.activationrequest])
java.lang.ClassCastException:
org.apache.camel.converter.stream.InputStreamCache cannot be cast to
org.w3c.dom.Node
    at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:116)
    at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:98)
    at
com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:180)
    at
org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:492)
    at
org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:464)
    at
org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:121)
    at
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:48)
    at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
    at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
    at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
    at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
    at
com.monitor.MonitorXceptorProcessor.process(MonitorXceptorProcessor.java:59)
    at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
    at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
    at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
    at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
    at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
    at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:56)
    at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:231)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
    at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
    at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
    at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
    at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
    at
com.monitor.MonitorXceptorProcessor.process(MonitorXceptorProcessor.java:59)
    at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
    at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
    at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
    at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
    at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
    at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:56)
    at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:231)
    at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
    at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
    at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
    at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)
    at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
    at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
    at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
    at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
    at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
    at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
    at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
    at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
    at java.lang.Thread.run(Thread.java:619)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message