I am currently trying to write a test for this error ...
The problem is that the NPE only seems to occur when the route is run in
OSGi.
I do not set any error handler. Still the DefaultErrorHandler is run.
Does anyone know in which cases this might happen?
Christian
Am 09.03.2012 20:27, schrieb Christian Schneider:
I have a route that starts with from("jms:...") somewhere in the route
an exception is thrown.
When that happens I get a NPE in the RedeliveryErrorHandler. The line is:
SubUnitOfWorkCallback uowCallback =
exchange.getUnitOfWork().getSubUnitOfWorkCallback();
The reason is that unitOfWork is null.
Is that a bug? Should unitOfWork always be !=null?
btw. I use camel 2.8.4
Christian
----
Caused by: java.lang.NullPointerException
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:247)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:139)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:106)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:572)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:505)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:218)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:150)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.RecipientList.process(RecipientList.java:111)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[96:org.apache.camel.camel-core:2.8.4]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:116)[96:org.apache.camel.camel-core:2.8.4]
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com