L.S., Sorry for the delay, I lost track of your question... Anyway, I suspect the problem is coming from the seda: queues in the routes. The seda component has been significantly improved over the last versions of Camel, but this version probably isn't capable of handling the InOut MEP correct over a seda queue. Could you try replacing the seda: endpoitns with direct: endpoints to see if that fixes the problem? We're in the process of releasing new components and container version, but I don't think you really need the seda: here for performance/scalability. The JBI runtime will already use seda and/or jms queues to communicate between components.
Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ 2009/12/14 devylon <[email protected]>: > > Gert, > > i attached the servicemix logfile... > > My first camel route looks like this: > Namespaces ns = new Namespaces("msg", FULFILLMENT_MSG_NS); > > from("jbi:endpoint:"+ FULFILLMENT_JBI) > > .to("log:com.kdfs.fulfillment.camel.ChoiceFulfiller?level=INFO") > .choice() > .when().xpath("//msg:orderFormat/text() = 'FOO'", ns) > > .to("log:com.kdfs.fulfillment.routing.camel.xpath.to.foo?level=DEBUG") > > .to("jbi:endpoint:http://namespace.kdfs.com/fulfillment/foo/FooService/FooEndpoint") > .when().xpath("//msg:orderFormat/text() = 'BAR'", ns) > > .to("log:com.kdfs.fulfillment.routing.camel.xpath.to.bar?level=DEBUG") > > .to("jbi:endpoint:http://namespace.kdfs.com/fulfillment/bar/BarService/BarEndpoint") > .otherwise() > .to("seda:cleanup"); > > from("seda:cleanup") > .to("log:com.kdfs.fulfillment.camel.Cleanup?level=INFO"); > > and the second route: > > > from("jbi:endpoint:http://namespace.kdfs.com/fulfillment/bar/BarService/BarEndpoint") > // .streamCaching() > .to("seda:bar-transform"); > > from("seda:bar-transform") > .to("log:com.kdfs.fulfillment.camel.BarTransform?level=INFO") > .to("jbi:endpoint:" + BAR_TRANSFORMER) > .to("seda:ot-transform"); > .... > > Regards, > Ingo > > > Gert Vanthienen wrote: >> >> Ingo, >> >> What version of servicemix are you using? With the exact version, I >> can take a look at the cause for the NPE in the first stacktrace. For >> the second exception, that usually happens if you are handling >> exchanges asynchronously (like e.g. using the threads() in DSL or >> using an aggregator). It means that the component is trying to answer >> an exchange that has already been answered (so the consuming component >> 'owns' the exchange again). >> >> One thing that would help us troubleshoot this issue, is if you could >> provide us with a DEBUG log that contains the exchanges up to the >> moment where you start getting the exceptions. This gives us an idea >> on what kind of data is being conveyed in the ESB and it should also >> show an exchange being answered from the camel route right before we >> get the exception. >> >> Regards, >> >> Gert Vanthienen >> ------------------------ >> Open Source SOA: http://fusesource.com >> Blog: http://gertvanthienen.blogspot.com/ >> >> >> 2009/12/14 devylon <[email protected]>: >>> >>> Hi, >>> >>> i'm struggling with camel and mep and home someone can me help or give me >>> a hint what i'm doing wrong. my scenario is the following: >>> - cxf-bc service unit >>> - cxf-se service unit >>> - camel service unit >>> -- routing the message to some bean service units >>> >>> the cxf-bc is defining a wsdl and sends the message to the cxf-se: >>> <cxfbc:consumer >>> wsdl="classpath:META-INF/FulfillmentService_v1_0.wsdl" >>> targetService="foo:FulfillmentService_v1_0" >>> targetInterface="foo:FulfillmentService_v1_0" > >>> </cxfbc:consumer> >>> >>> The cxf-se implements the webservice interface: >>> <cxfse:endpoint useJBIWrapper="true" useSOAPEnvelope="true"> >>> <cxfse:pojo> >>> <bean >>> class="foo.ws.cxf.FulfillmentServiceEndpointV10" /> >>> </cxfse:pojo> >>> </cxfse:endpoint> >>> >>> and in the implementation of the webserice i'm routing the message to the >>> bus: >>> InOut exchange = client.createInOutExchange(); >>> exchange.setService(new >>> QName("http://ns1.foo.com/fulfillment/v1_0/FulfillmentService","FulfillmentService_v1_0_JBI")); >>> exchange.setInterfaceName(new >>> QName("http://ns1.foo.com/fulfillment/v1_0/FulfillmentService","FulfillmentService_v1_0_JBI/JBI")); >>> >>> NormalizedMessage message = >>> exchange.getInMessage(); >>> message.setContent(new >>> StringSource(writer.getBuffer().toString())); >>> >>> client.send(exchange); >>> >>> My camel route is definded in a camel service unit: >>> ... >>> from("jbi:endpoint:http://ns1.foo.com/fulfillment/v1_0/FulfillmentService/FulfillmentService_v1_0_JBI/JBI) >>> .to("jbi:endpoint:http://ns1.foo.com/fulfillment/MyService/MyEndpoint"); >>> >>> The MySerice serivce assembly contains a bean-su and a camel-su: >>> >>> camel-su: >>> ... >>> from("jbi:endpoint:http://ns1.foo.com/fulfillment/MyService/MyEndpoint") >>> .to("jbi:endpoint:http://ns1.foo.com/fulfillment/transform/MyService/MyEndpoint") >>> .to("jbi:endpoint:http://ns1.foo.com/fulfillment/dosomething/MyService/MyEndpoint") >>> >>> 1st bean-su: >>> <bean:endpoint service="bar:MyService" endpoint="MyEndpoint" >>> bean="#myEndpointImpl"> >>> </bean:endpoint> >>> >>> 2nd bean-su: >>> <bean:endpoint service="doo:MyService" endpoint="MyEndpoint" >>> bean="#myOtherEndpointImpl"> >>> </bean:endpoint> >>> >>> >>> The routing works until the message receives in the 1st bean-su. >>> >>> In the implementation i'm doing something likethis: >>> NormalizedMessage outMessage = >>> exchange.createMessage(); >>> LOGGER.debug("outMessage: " + outMessage); >>> outMessage.setContent(new >>> StringSource(message)); >>> exchange.setMessage(outMessage, "out"); >>> channel.send(exchange); >>> >>> This seems to throw an error on the bus: >>> >>> jvm 1 | java.lang.NullPointerException >>> jvm 1 | at >>> org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:68) >>> jvm 1 | at >>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627) >>> jvm 1 | at >>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:598) >>> jvm 1 | at >>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535) >>> jvm 1 | at >>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60) >>> jvm 1 | at >>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623) >>> jvm 1 | at >>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172) >>> jvm 1 | at >>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168) >>> jvm 1 | at >>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) >>> jvm 1 | at >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) >>> jvm 1 | at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) >>> jvm 1 | at java.lang.Thread.run(Thread.java:636) >>> >>> and >>> >>> jvm 1 | java.lang.IllegalStateException: component is not owner >>> jvm 1 | at >>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:338) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.createMessage(JbiExchange.java:174) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.createOutMessage(JbiExchange.java:150) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.createOutMessage(JbiExchange.java:37) >>> jvm 1 | at >>> org.apache.camel.impl.DefaultExchange.getOut(DefaultExchange.java:213) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.getOut(JbiExchange.java:71) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.getOut(JbiExchange.java:37) >>> jvm 1 | at >>> org.apache.camel.impl.DefaultExchange.getOut(DefaultExchange.java:208) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.getOut(JbiExchange.java:66) >>> jvm 1 | at >>> org.apache.servicemix.camel.JbiExchange.getOut(JbiExchange.java:37) >>> jvm 1 | at >>> org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:68) >>> jvm 1 | at >>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627) >>> jvm 1 | at >>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:598) >>> jvm 1 | at >>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535) >>> jvm 1 | at >>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60) >>> jvm 1 | at >>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623) >>> jvm 1 | at >>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172) >>> jvm 1 | at >>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168) >>> jvm 1 | at >>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) >>> jvm 1 | at >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) >>> jvm 1 | at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) >>> jvm 1 | at java.lang.Thread.run(Thread.java:636) >>> >>> Hope someone can help me ?!? >>> >>> -- Ingo >>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/cxf-se---%3E-camel---%3E-message-exchange-problems-InOut-tp26775867p26775867.html >>> Sent from the ServiceMix - User mailing list archive at Nabble.com. >>> >>> >> >> >> ----- >> --- >> Gert Vanthienen >> http://gertvanthienen.blogspot.com >> > http://old.nabble.com/file/p26778348/servicemix.log servicemix.log > -- > View this message in context: > http://old.nabble.com/cxf-se---%3E-camel---%3E-message-exchange-problems-InOut-tp26775867p26778348.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > >
