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. > >
