ContentEnricher throws NullPointerException when enricherTarget returns fault
message
-------------------------------------------------------------------------------------
Key: SMXCOMP-576
URL: https://issues.apache.org/activemq/browse/SMXCOMP-576
Project: ServiceMix Components
Issue Type: Bug
Components: servicemix-eip
Affects Versions: servicemix-eip-2009.01
Environment: Gentoo Linux, servicemix 3.3.1 built from trunk rev781946
Reporter: Miklós Péter
ContentEnricher throws NullPointerException when the enricherTarget has no
"out" message for example in case of fault.
As I see, the following call in process() method
Document document = combineToDOMDocument(exchange.getMessage("in"),
enricherTargetME.getMessage("out"));
passes null to the targetResultMessage argument of combineToDOMDocument()
method which is then throws NPE when trying to get the contents of the message:
Node targetResultNode = getDOMNode(targetResultMessage.getContent());
The stacktrace is below:
java.lang.NullPointerException
at
org.apache.servicemix.eip.patterns.ContentEnricher.combineToDOMDocument(ContentEnricher.java:259)
at
org.apache.servicemix.eip.patterns.ContentEnricher.process(ContentEnricher.java:209)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)
at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.