[ 
https://issues.apache.org/activemq/browse/CAMEL-927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46005#action_46005
 ] 

Vadim Chekan commented on CAMEL-927:
------------------------------------

Well, I filed this bug not because I worry about selseless combo from().from(); 
but because I see some inconsistency in error handling.

In case of "from();" there is the same exception happen internally. A processor 
tries to call the next processor withing the chain and fails with NPE. This 
exception is intercepted and message is marked as "failed". But you can not see 
anything wrong logged to the console. But in case of double inputs, exception 
becomes visible.
So I suspect that actually "from.from" produces correct behavior when "from" 
hides an error.

I don't think that "from.from" is totally bogus. Lets say we want to drain some 
data source and we are not interested in the result.

Am I right that processes shoud call this.proceed instead of calling next 
processor in the chain explicitly? Anyway, my concern is invisible exception in 
the single "from" case. There is still NPE happening, why I can't see it in the 
output?

> Double input without output produce exception
> ---------------------------------------------
>
>                 Key: CAMEL-927
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-927
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Vadim Chekan
>            Priority: Minor
>
> Turn trace on.
> Run this route:
>               from("timer://kickoff_1?period=10000&delay=1");
> As expected there is output from Trace Interceptor every 10 sec.
> Now run this route:
>               from("timer://kickoff_1?period=10000&delay=1").
>               from("timer://kickoff_2?period=10000&delay=2");
> You will get exception:
> 2008-09-22 06:03:01,871 [d=10000&delay=2] INFO  TraceInterceptor              
>  - ID-ubuntu/50540-1222063381751/2-1 -> interceptor1 
> Interceptor[Delegate(null)] InOnly 
> Properties:{org.apache.camel.timer.name=kickoff_2, 
> org.apache.camel.timer.firedTime=Mon Sep 22 06:03:01 GMT 2008, 
> org.apache.camel.timer.period=10000} Headers:{firedTime=Mon Sep 22 06:03:01 
> GMT 2008} BodyType:null Body:Message: null
> 2008-09-22 06:03:01,872 [d=10000&delay=2] ERROR DeadLetterChannel             
>  - Failed delivery for exchangeId: ID-ubuntu/50540-1222063381751/0-0. On 
> delivery attempt: 0 caught: java.lang.NullPointerException
> java.lang.NullPointerException
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
>       at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
>       at 
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
>       at 
> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
>       at 
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:67)
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
>       at 
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:174)
>       at 
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:96)
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
>       at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
>       at 
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
>       at 
> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
>       at 
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:67)
>       at 
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
>       at 
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
>       at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>       at 
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
>       at 
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:98)
>       at 
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:49)
>       at java.util.TimerThread.mainLoop(Timer.java:512)
>       at java.util.TimerThread.run(Timer.java:462)
> Why single input works fine and two produce an exception?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to