camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Ivar Igesund <larsi...@igesund.net>
Subject Re: Various camel issues
Date Tue, 16 Dec 2008 09:02:06 GMT
Tysdag 16. desember 2008 06:21:24 skreiv Claus Ibsen:
> On Tue, Dec 16, 2008 at 12:56 AM, Lars Ivar Igesund
>
> <larsivar@igesund.net> wrote:
> > Hi!
> >
> > We have a central routing application/server using spring and camel and
> > AMQ, and various clients connecting to it.
> >
> > Now, for the last couple of months we've been using 1.4.0 which generally
> > works fine. However, fairly often after a restart of the server app (it
> > is still under development), it hangs as it replies to the first client
> > to connect.
> >
> > I've not been able to get a stack trace, but the information I do have is
> > that I use sendBodyAndHeaders from DefaultProducerTemplate instance, and
> > that it logs ">>>> endpoint + " " + exchange" in ProducerCache.
>
> Which kind of producer is it? JMS, Http etc? Have you enabled
> DEBUG/TRACE logging for that producer. It might log a bit more where
> it "hangs".

It is JMS using AMQ. Enabling DEBUG/TRACE for org.apache.activemq in addition 
to CAMEL yields no more information - the next messages after the one in 
ProducerCache are from the InactivityMonitor.

An additional point is that this only seems to happen (don't have proof for 
this) if I start the client immediately after the server is done starting up 
(ie Camel and AMQ appears to be done logging) - if I wait some, say 30 
seconds, it seems to work fine.

Maybe there is a deadlock if trying to send with a resource that isn't fully 
constructed yet?

> > Then I tried to upgrade to 1.5.0, this does however not work at all (it
> > compiles without problems), as I get a NullPointerException on line 186
> > of component/bean/MethodInfo - seems like there is a null expression.
>
> Could you paste the stacktrace and a bit more info on ths NPE? There
> is a known issue if a message contains a null body and you use the
> tracer to log it.

java.lang.NullPointerException
	at org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:186)
	at 
org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:78)
	at 
org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:121)
	at 
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:111)
	at 
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:92)
	at 
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:66)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
	at 
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
	at 
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
	at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
	at 
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
	at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:50)
	at 
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
	at 
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
	at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
	at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75)
	at 
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
	at 
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
	at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
	at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
	at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
	at 
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
	at 
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
	at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
	at 
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
	at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:65)
	at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:69)
	at java.lang.Thread.run(Thread.java:619)

The Tracer and null messages bug was the reason for upgrading from 1.3.0 to 
1.4.0 ... This issue in 1.5.0 is present even if I disable the tracer. 
However, it is quite likely that the message object contains null references.

I did try to rebuild camel with an if (expression[i] != null) before the NPE 
statement, something which seems to lead to a null reference to the message 
headers instead (in my handler) (in case that is relevant information).

Best,
Lars Ivar


Mime
View raw message