You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by manish_goyal <ma...@infosys.com> on 2008/11/17 06:44:39 UTC
error while using eip:xpath-predicate
Hi,
I am using content based routing. it's giving me error like this :-
ERROR - EIPComponent - Error processing exchange InOnly[
id: ID:10.94.117.3-11da8f7654d-11:0
status: Active
role: provider
service: {http://router}router
endpoint: Router
in: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="h
ttp://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas
.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><EPHServiceExcepti
on xmlns:ns2="http://www.cvs.com/eph/messages/1_0"
xmlns:ns4="http://www.cvs.com
/eph/cvs/eph/test"><ns2:ComponentName>ClientID</ns2:ComponentName><ns2:RequestID
>55555</ns2:RequestID><ns2:Severity>HIGH</ns2:Severity><ns2:Code1>1001</ns2:Code
1><ns2:Code2>1002</ns2:Code2><ns2:UserName>CVS</ns2:UserName><ns2:MessageDesc>Lo
g
Message</ns2:MessageDesc></EPHServiceException></SOAP-ENV:Body></SOAP-ENV:Enve
lope>
]
javax.jbi.messaging.MessagingException: No matching rule found for exchange
at
org.apache.servicemix.eip.patterns.ContentBasedRouter.getDestination(
ContentBasedRouter.java:83)
at
org.apache.servicemix.eip.support.AbstractContentBasedRouter.processA
sync(AbstractContentBasedRouter.java:116)
at
org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:540)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:492)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - JmsComponent - Error processing exchange InOnly[
id: ID:10.94.117.3-11da8f7654d-11:0
status: Error
role: consumer
service: {http://router}router
endpoint: Router
in: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="h
ttp://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas
.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><EPHServiceExcepti
on xmlns:ns2="http://www.cvs.com/eph/messages/1_0"
xmlns:ns4="http://www.cvs.com
/eph/cvs/eph/test"><ns2:ComponentName>ClientID</ns2:ComponentName><ns2:RequestID
>55555</ns2:RequestID><ns2:Severity>HIGH</ns2:Severity><ns2:Code1>1001</ns2:Code
1><ns2:Code2>1002</ns2:Code2><ns2:UserName>CVS</ns2:UserName><ns2:MessageDesc>Lo
g
Message</ns2:MessageDesc></EPHServiceException></SOAP-ENV:Body></SOAP-ENV:Enve
lope>
error: javax.jbi.messaging.MessagingException: No matching rule found for
exch
ange
]
org.springframework.jms.listener.adapter.ListenerExecutionFailedException:
Excha
nge processing failed; nested exception is
javax.jbi.messaging.MessagingExceptio
n: No matching rule found for exchange
Caused by:
javax.jbi.messaging.MessagingException: No matching rule found for exchange
at
org.apache.servicemix.eip.patterns.ContentBasedRouter.getDestination(
ContentBasedRouter.java:83)
at
org.apache.servicemix.eip.support.AbstractContentBasedRouter.processA
sync(AbstractContentBasedRouter.java:116)
at
org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:540)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:492)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - JmsComponent - Error setting exchange status to
ERROR
javax.jbi.messaging.MessagingException: illegal call to send / sendSync
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(Me
ssageExchangeImpl.java:614)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:385)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
ChannelImpl.java:431)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:58)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
at java.lang.Thread.run(Thread.java:595)
My xbean file is :-
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
xmlns:test="http://jms"
xmlns:rout="http://router"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://servicemix.apache.org/eip/1.0
http://servicemix.apache.org/schema/servicemix-eip-3.2.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<eip:content-based-router service="rout:router" endpoint="Router">
<eip:rules>
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate
xpath="(/SOAP-ENV:Envelope/SOAP-ENV:Body/EPHServiceException/ns2:Code1/text()
= '1001' )" />
</eip:predicate>
<eip:target>
<eip:exchange-target service="rout:MyProviderService1" />
</eip:target>
</eip:routing-rule>
<!-- <eip:routing-rule>
<eip:target>
<eip:exchange-target service="rout:MyProviderService1" />
</eip:target>
</eip:routing-rule>-->
</eip:rules>
</eip:content-based-router>
</beans>
My Message is :-
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><EPHServiceException
xmlns:ns2="http://www.cvs.com/eph/messages/1_0"
xmlns:ns4="http://www.cvs.com/eph/cvs/eph/test"><ns2:ComponentName>ClientID</ns2:ComponentName><ns2:RequestID>55555</ns2:RequestID><ns2:Severity>HIGH</ns2:Severity><ns2:Code1>1001</ns2:Code1><ns2:Code2>1002</ns2:Code2><ns2:UserName>CVS</ns2:UserName><ns2:MessageDesc>Log
Message</ns2:MessageDesc></EPHServiceException></SOAP-ENV:Body></SOAP-ENV:Envelope>
Please give some pointer to solve this problem.
Thanks.
Regards
Manish
--
View this message in context: http://www.nabble.com/error-while-using-eip%3Axpath-predicate-tp20534120p20534120.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: error while using eip:xpath-predicate
Posted by Guillaume Nodet <gn...@gmail.com>.
The error says that no rules is matching your message.
The reason is that you need to specify the namespace mappings to use
when using the xpath expression as indicated in the documentation
(http://servicemix.apache.org/servicemix-eip.html). In your case, you
need to associate your SOAP-ENV prefix to the correc namespace
("http://schemas.xmlsoap.org/soap/envelope/"), put that on a namespace
context and set that context on the xpath rule.
On Mon, Nov 17, 2008 at 6:44 AM, manish_goyal
<ma...@infosys.com> wrote:
>
> Hi,
>
> I am using content based routing. it's giving me error like this :-
> ERROR - EIPComponent - Error processing exchange InOnly[
> id: ID:10.94.117.3-11da8f7654d-11:0
> status: Active
> role: provider
> service: {http://router}router
> endpoint: Router
> in: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="h
> ttp://schemas.xmlsoap.org/soap/envelope/"
> SOAP-ENV:encodingStyle="http://schemas
> .xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><EPHServiceExcepti
> on xmlns:ns2="http://www.cvs.com/eph/messages/1_0"
> xmlns:ns4="http://www.cvs.com
> /eph/cvs/eph/test"><ns2:ComponentName>ClientID</ns2:ComponentName><ns2:RequestID
>>55555</ns2:RequestID><ns2:Severity>HIGH</ns2:Severity><ns2:Code1>1001</ns2:Code
> 1><ns2:Code2>1002</ns2:Code2><ns2:UserName>CVS</ns2:UserName><ns2:MessageDesc>Lo
> g
> Message</ns2:MessageDesc></EPHServiceException></SOAP-ENV:Body></SOAP-ENV:Enve
> lope>
> ]
> javax.jbi.messaging.MessagingException: No matching rule found for exchange
> at
> org.apache.servicemix.eip.patterns.ContentBasedRouter.getDestination(
> ContentBasedRouter.java:83)
> at
> org.apache.servicemix.eip.support.AbstractContentBasedRouter.processA
> sync(AbstractContentBasedRouter.java:116)
> at
> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:540)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:492)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - JmsComponent - Error processing exchange InOnly[
> id: ID:10.94.117.3-11da8f7654d-11:0
> status: Error
> role: consumer
> service: {http://router}router
> endpoint: Router
> in: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="h
> ttp://schemas.xmlsoap.org/soap/envelope/"
> SOAP-ENV:encodingStyle="http://schemas
> .xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><EPHServiceExcepti
> on xmlns:ns2="http://www.cvs.com/eph/messages/1_0"
> xmlns:ns4="http://www.cvs.com
> /eph/cvs/eph/test"><ns2:ComponentName>ClientID</ns2:ComponentName><ns2:RequestID
>>55555</ns2:RequestID><ns2:Severity>HIGH</ns2:Severity><ns2:Code1>1001</ns2:Code
> 1><ns2:Code2>1002</ns2:Code2><ns2:UserName>CVS</ns2:UserName><ns2:MessageDesc>Lo
> g
> Message</ns2:MessageDesc></EPHServiceException></SOAP-ENV:Body></SOAP-ENV:Enve
> lope>
> error: javax.jbi.messaging.MessagingException: No matching rule found for
> exch
> ange
> ]
> org.springframework.jms.listener.adapter.ListenerExecutionFailedException:
> Excha
> nge processing failed; nested exception is
> javax.jbi.messaging.MessagingExceptio
> n: No matching rule found for exchange
> Caused by:
> javax.jbi.messaging.MessagingException: No matching rule found for exchange
> at
> org.apache.servicemix.eip.patterns.ContentBasedRouter.getDestination(
> ContentBasedRouter.java:83)
> at
> org.apache.servicemix.eip.support.AbstractContentBasedRouter.processA
> sync(AbstractContentBasedRouter.java:116)
> at
> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:540)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:492)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:46)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - JmsComponent - Error setting exchange status to
> ERROR
> javax.jbi.messaging.MessagingException: illegal call to send / sendSync
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(Me
> ssageExchangeImpl.java:614)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
> ryChannelImpl.java:385)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
> ChannelImpl.java:431)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
> Cycle.java:58)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:167)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
> at java.lang.Thread.run(Thread.java:595)
>
>
> My xbean file is :-
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
> xmlns:test="http://jms"
> xmlns:rout="http://router"
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://servicemix.apache.org/eip/1.0
> http://servicemix.apache.org/schema/servicemix-eip-3.2.2.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
> <eip:content-based-router service="rout:router" endpoint="Router">
> <eip:rules>
> <eip:routing-rule>
> <eip:predicate>
> <eip:xpath-predicate
> xpath="(/SOAP-ENV:Envelope/SOAP-ENV:Body/EPHServiceException/ns2:Code1/text()
> = '1001' )" />
> </eip:predicate>
> <eip:target>
> <eip:exchange-target service="rout:MyProviderService1" />
> </eip:target>
> </eip:routing-rule>
> <!-- <eip:routing-rule>
> <eip:target>
> <eip:exchange-target service="rout:MyProviderService1" />
> </eip:target>
> </eip:routing-rule>-->
> </eip:rules>
> </eip:content-based-router>
>
> </beans>
>
> My Message is :-
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><EPHServiceException
> xmlns:ns2="http://www.cvs.com/eph/messages/1_0"
> xmlns:ns4="http://www.cvs.com/eph/cvs/eph/test"><ns2:ComponentName>ClientID</ns2:ComponentName><ns2:RequestID>55555</ns2:RequestID><ns2:Severity>HIGH</ns2:Severity><ns2:Code1>1001</ns2:Code1><ns2:Code2>1002</ns2:Code2><ns2:UserName>CVS</ns2:UserName><ns2:MessageDesc>Log
> Message</ns2:MessageDesc></EPHServiceException></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
> Please give some pointer to solve this problem.
>
> Thanks.
>
> Regards
> Manish
> --
> View this message in context: http://www.nabble.com/error-while-using-eip%3Axpath-predicate-tp20534120p20534120.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com