Hello, I'm trying to use an unmarshaller within a route that starts from a seda endpoint:
from("seda:incoming.stocks") .unmarshal(stockUnmarshaller) .to("jpa:stock.domain.IntegrationStock?usePersist=true"); Basically, this endpoint consumes XML messages in a custom format and uses a custom dataformat to unmarshal the xml input into a Java object that will be persisted in database just after. For internal reasons, we don't use JAXB, hence the custom dataformat 'stockUnmarshaller' here. In the log console, I have the following error messages for each 'stock' message: Digging into the SedaEnpoint code, I found this: protected synchronized MulticastProcessor getConsumerMulticastProcessor() throws Exception { if (!multicastStarted && consumerMulticastProcessor != null) { // only start it on-demand to avoid starting it during stopping ServiceHelper.startService(consumerMulticastProcessor); multicastStarted = true; } return consumerMulticastProcessor; } In my case, the 'if' block is not executed because the consumerMulticastProcessor is null. Thus, the return value is null too. In the SedaConsumer class: protected void sendToConsumers(Exchange exchange) throws Exception { int size = endpoint.getConsumers().size(); // if there are multiple consumers then multicast to them if (size > 1) { // use a multicast processor to process it MulticastProcessor mp = endpoint.getConsumerMulticastProcessor(); // and use the asynchronous routing engine to support it AsyncProcessorHelper.process(mp, exchange, new AsyncCallback() { public void done(boolean doneSync) { // noop } }); } else { ... } } the MulticastProcessor 'mp' is null, and the AsyncProcessorHelper.process() method throws a NullPointerException. How can I avoid this ? Thank you in advance Regards, /Xavier -- View this message in context: http://camel.465427.n5.nabble.com/NullPointerException-in-SedaConsumer-tp3696144p3696144.html Sent from the Camel - Users mailing list archive at Nabble.com.