camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Issue with seda and stream
Date Tue, 25 Oct 2011 09:03:25 GMT
Hi

Can you create a JIRA ticket with that minor bug. There should not be
a NPE in the Camel components.

Link to JIRA here
http://camel.apache.org/support

On Tue, Oct 25, 2011 at 10:40 AM, llt <lorenzo@reality.it> wrote:
> Hi,
>
> I found, I think, an issue with seda and stream endpoints.
> Using more then 1 concurrent consumers for seda and using "stream:out" as
> destination endopoint , I sometimes receive some NullPointerExceptions.
>
> This is how to reproduce the problem:
>
> context.addRoutes(new RouteBuilder() {
>  @Override
>   public void configure() throws Exception {
>        from("seda:sendRequest?concurrentConsumers=10")
>        .to("stream:out");
>   }
> });
> context.start();
>
> for ( int i = 0; i < 50000; i++ ) {
>        producer.sendBody("seda:sendRequest", String.format("Message %d", i));
> }
>
> And this is one of the exceptions:
>
> 2011-10-25 10:12:36,550 ERROR
> [org.apache.camel.processor.DefaultErrorHandler] - Failed delivery for
> exchangeId: ID-localhost-51879-1319530353835-0-48591. Exhausted after
> delivery attempt: 1 caught: java.lang.NullPointerException
> java.lang.NullPointerException: null
>        at java.io.Writer.<init>(Writer.java:71) ~[na:1.6.0_26]
>        at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:113)
> ~[na:1.6.0_26]
>        at
> org.apache.camel.component.stream.StreamProducer.writeToStream(StreamProducer.java:135)
> ~[camel-stream-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.component.stream.StreamProducer.process(StreamProducer.java:83)
> ~[camel-stream-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
> ~[camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)
> ~[camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)
> ~[camel-core-2.8.1.jar:2.8.1]
>        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)
> ~[camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
> ~[camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:217)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:155)
> [camel-core-2.8.1.jar:2.8.1]
>        at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:129)
> [camel-core-2.8.1.jar:2.8.1]
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [na:1.6.0_26]
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [na:1.6.0_26]
>        at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26]
>
> If I replace "stream:out" destination with JMS or I set the
> concurrentConsumer to 1 for seda, my example works fine.
>
> Ciao,
> Lorenzo
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Issue-with-seda-and-stream-tp4935469p4935469.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message