You can give "bescocr", but you have to define what bescocr means for JBIHelper in your drools file.
jbi -> this is nothing but the JBIHelper with some helper methods. This is imported in your drools file. I have included your namespace in the uri to simplify this. It works for me. Send me your complete log/configurations to understand if there is any other problem. Regards, Rabi Mishra, http://rabisblog.blogspot.com/ c++; /* this makes c bigger but returns the old value */ -----Original Message----- From: Arif Mohd [mailto:[EMAIL PROTECTED] Sent: Thursday, June 21, 2007 11:39 AM To: [email protected] Subject: RE: Problem while invoking rule by using drools component Hi Rabi, I didn't understand this concept of giving service name as "service:http://xxx.com/bescocr_031807/tap1" but still it is not working Can you please elobarate what is the meaning of the above statement, i agree that previously i have missed to preceede the service name with namespace i.e, i should have given like jbi.route( "service:bescocr:tap1" ); But even the above statement is not working rabi wrote: > > > in your routing.drl replace > > jbi.route( "bescocr::tap1" ); with > > jbi.route("service:http://xxx.com/bescocr_031807 > <https://webmail.wipro.com/exchweb/bin/redir.asp?URL=http://xxx.com/be > scocr_031807> > /tap1"); > > and jbi.route( "bescocr::tap2" ); with > > jbi.route("service:http://xxx.com/bescocr_031807 > <https://webmail.wipro.com/exchweb/bin/redir.asp?URL=http://xxx.com/be > scocr_031807> > /tap2"); > > Regards, > Rabi Mishra > http://rabisblog.blogspot.com/ > > ________________________________ > > From: Arif Mohd [mailto:[EMAIL PROTECTED] > Sent: Wed 6/20/2007 7:25 PM > To: [email protected] > Subject: Problem while invoking rule by using drools component > > > > > Hi, > > Iam having the following setup > > JMS queue(Consumer)-->eip:Content Based > Router-->SA(DroolsComponent)-->eip:TAP1 or eip:TAP2(Based on rule > Router-->base) > > part of xbean.xml for "eip:Content Based Router" is > > <eip:routing-rule> > <eip:predicate> > <eip:xpath-predicate xpath="/Record/eid = 100" > namespaceContext="#nsContext" /> > </eip:predicate> > <eip:target> > <eip:exchange-target service="bescocr:myDroolsService" /> > </eip:target> > </eip:routing-rule> > > xbean.xml for DroolsComponent(SU) is > > <beans xmlns:drools="http://servicemix.apache.org/drools/1.0" > xmlns:bescocr="http://xxx.com/bescocr_031807"> > <drools:endpoint > service="bescocr:myDroolsService" > endpoint="endpoint" > ruleBaseResource="classpath:routing.drl"/> > </beans> > > > routing.drl is > > package org.apache.servicemix.drools > import org.apache.servicemix.drools.model.Exchange; > global org.apache.servicemix.drools.model.JbiHelper jbi; > > rule "Route to tap1" > when > me : Exchange( status == Exchange.ACTIVE, in : in != > null > ) > eval( in.xpath("/Record/eid = 100") ) > then > jbi.route( "bescocr::tap1" ); end > > rule "Route to tap2" > when > me : Exchange( status == Exchange.ACTIVE, in : in != > null > ) > eval( in.xpath("/Record/eid = 101") ) > then > jbi.route( "bescocr::tap2" ); end > > > with the above setup iam getting the following exception "for service: > null > and interface: null" the exception is as follows, do i need to set > something else in xbean.xml? > > javax.jbi.messaging.MessagingException: Could not find route for exchange: > InOnly[ > id: ID:EC4T16INT165110-4730-1182344415869-7:0 > status: Active > role: provider > in: <My Message> > ] for service: null and interface: null > at > org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBr oker.java:295) > at > org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(Secu redBroker.java:80) > at > org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContain er.java:793) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryC hannelImpl.java:381) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deliver yChannelImpl.java:456) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deliver yChannelImpl.java:428) > at > org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDe liveryChannel.java:88) > at > org.apache.servicemix.drools.model.JbiHelper.route(JbiHelper.java:109) > at > org.apache.servicemix.drools.Rule_Route_to_tap1_0.consequence(Rule_Route _to_tap1_0.java:11) > at > org.apache.servicemix.drools.Rule_Route_to_tap1_0ConsequenceInvoker.ev > aluate(Rule_Route_to_tap1_0ConsequenceInvoker.ja > va:19) > at org.drools.common.DefaultAgenda.fireActivation(Unknown Source) > at org.drools.common.DefaultAgenda.fireNextItem(Unknown Source) > at > org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown > Source) > at > org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown > Source) > at > org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:1 50) > at > org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java: 141) > at > org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC ycle.java:489) > at > org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas eLifeCycle.java:441) > at > org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc le.java:46) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D eliveryChannelImpl.java:593) > at > org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j ava: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:1 34) > 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) > ERROR - DroolsComponent - Error processing exchange InOnly[ > id: ID:EC4T16INT165110-4730-1182344415869-3:2 > status: Active > role: provider > service: {http://xxx.com/bescocr_031807}myDroolsService > endpoint: endpoint > in: <My Message> > ] > org.drools.spi.ConsequenceException: > javax.jbi.messaging.MessagingException: > Could not find route for exchange: InOnly[ > id: ID:EC4T16INT165110-4730-1182344415869-7:0 > status: Active > role: provider > in: <My Message> > ] for service: null and interface: null > at org.drools.common.DefaultAgenda.fireActivation(Unknown Source) > at org.drools.common.DefaultAgenda.fireNextItem(Unknown Source) > at > org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown > Source) > at > org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown > Source) > at > org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:1 50) > at > org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java: 141) > at > org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC ycle.java:489) > at > org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas eLifeCycle.java:441) > at > org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc le.java:46) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D eliveryChannelImpl.java:593) > at > org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j ava: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:1 34) > 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) > Caused by: javax.jbi.messaging.MessagingException: Could not find > route for > exchange: InOnly[ > id: ID:EC4T16INT165110-4730-1182344415869-7:0 > status: Active > role: provider > in: <My Message> > ] for service: null and interface: null > at > org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBr oker.java:295) > at > org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(Secu redBroker.java:80) > at > org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContain er.java:793) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryC hannelImpl.java:381) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deliver yChannelImpl.java:456) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deliver yChannelImpl.java:428) > at > org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDe liveryChannel.java:88) > at > org.apache.servicemix.drools.model.JbiHelper.route(JbiHelper.java:109) > at > org.apache.servicemix.drools.Rule_Route_to_tap1_0.consequence(Rule_Route _to_tap1_0.java:11) > at > org.apache.servicemix.drools.Rule_Route_to_tap1_0ConsequenceInvoker.ev > aluate(Rule_Route_to_tap1_0ConsequenceInvoker.ja > va:19) > ... 16 more > ERROR - JmsComponent - Error processing exchange InOnly[ > id: ID:EC4T16INT165110-4730-1182344415869-4:0 > status: Error > role: consumer > service: {http://xxx.com/bescocr_031807}JmsToPipeTapSvc > endpoint: tap > in: <My Message> > error: org.drools.spi.ConsequenceException: > javax.jbi.messaging.MessagingException: Could not find route for exchange: > InOnly[ > id: ID:EC4T16INT165110-4730-1182344415869-7:0 > status: Active > role: provider > in: <My Message> > ] for service: null and interface: null ] > java.lang.UnsupportedOperationException: A destination must be specified. > at > org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer .java:448) > at > org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:75) > at > org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:60) > at > org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.pro cess(MultiplexingConsumerProcessor.java:125) > at > org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC ycle.java:489) > at > org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas eLifeCycle.java:463) > at > org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc le.java:46) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D eliveryChannelImpl.java:593) > at > org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j ava: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:1 34) > 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) > 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(Messa geExchangeImpl.java:571) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryC hannelImpl.java:370) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryCha nnelImpl.java:417) > at > org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc le.java:58) > at > org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D eliveryChannelImpl.java:593) > at > org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j ava: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:1 34) > 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) > > > > > -- > View this message in context: > http://www.nabble.com/Problem-while-invoking-rule-by-using-drools-comp > onent-tf3952519s12049.html#a11213830 > Sent from the ServiceMix - User mailing list archive at Nabble.com. > > > > > > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately and destroy all copies of this message and any attachments. > > WARNING: Computer viruses can be transmitted via email. The recipient > should check this email and any attachments for the presence of viruses. > The company accepts no liability for any damage caused by any virus > transmitted by this email. > > www.wipro.com > -- View this message in context: http://www.nabble.com/Problem-while-invoking-rule-by-using-drools-compon ent-tf3952519s12049.html#a11227175 Sent from the ServiceMix - User mailing list archive at Nabble.com. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
