I am posting message to drools from jms-component. It works correctly for
jbi.route. When I use jbi.answer , it showns the message content on console but
it throws an exception A destination must be specified.How should I specify
destination in this case. Is it must to specify destination?
My drl file contains
-----------------------
rule "Route to target2"
when
me : Exchange( status == Exchange.ACTIVE, in : in != null )
eval( in.xpath("/test/@id = 2") )
then
jbi.answer("<Result>Modified Content</Result>");
Exception
--------------
DroolsEEEndPoint
in: <?xml version="1.0" encoding="UTF-8"?><test
id="2"><name>MyTEst</name></test>
out: <?xml version="1.0" encoding="UTF-8"?><A>Modified Content</A>
]
java.lang.UnsupportedOperationException: A destination must be specified.
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
at
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(MultiplexingConsumerProcessor.java:120)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:463)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
16:09:57,004 | ERROR | pool-flow.seda.servicemix-drools-thread-2 | JmsComponent
| ervicemix.common.BaseLifeCycle 60 | Error setting exchange
status to ERROR
java.lang.IllegalStateException: component is not owner when trying to set
error: java.lang.UnsupportedOperationException: A destination must be specified.
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setError(MessageExchangeImpl.java:224)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:57)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.