Quantcast

recipientList onException not catching CamelExchangeException

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

recipientList onException not catching CamelExchangeException

arda.aydin
Hi,        

I have a route with recipientList. When there is no consumers available on the calculated endpoint a org.apache.camel.CamelExchangeException is thrown.

The problem is even i tried many ways, i can't find the way to catch this exception with onException.

   this.onException(Exception.class).handled(true).process(new HandleExceptionProcessor());

   this.from("jms://producer1")
        .process(flowSelectorProcessor)
        .recipientList(header("FlowName"));

How can i catch it ?
Thanks in advance.

My stacktrace:

Caused by: org.apache.camel.CamelExchangeException: No consumers available on endpoint: Endpoint[direct://idInvalid]. Exchange[Message: ...]
        at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:56)
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
        at org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:587)
        at org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:516)
        at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:211)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
        at org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:134)
        at org.apache.camel.processor.RecipientList.process(RecipientList.java:102)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)
        at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:273)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
        at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:99)
        ... 11 more


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: recipientList onException not catching CamelExchangeException

Claus Ibsen-2
Hi

For others reading this as well, please read the highlighted in bold
part of this page, in the _how to get help_ section
http://camel.apache.org/support

Its important for us to know what Camel version you use. There is many releases.
And please spend time beforehand checking with newer releases if its fixed etc.




On Fri, May 11, 2012 at 1:33 AM, arda.aydin <[hidden email]> wrote:

> Hi,
>
> I have a route with recipientList. When there is no consumers available on
> the calculated endpoint a org.apache.camel.CamelExchangeException is thrown.
>
> The problem is even i tried many ways, i can't find the way to catch this
> exception with onException.
>
>   this.onException(Exception.class).handled(true).process(new
> HandleExceptionProcessor());
>
>   this.from("jms://producer1")
>        .process(flowSelectorProcessor)
>        .recipientList(header("FlowName"));
>
> How can i catch it ?
> Thanks in advance.
>
> My stacktrace:
>
> Caused by: org.apache.camel.CamelExchangeException: No consumers available
> on endpoint: Endpoint[direct://idInvalid]. Exchange[Message: ...]
>        at
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:56)
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:587)
>        at
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:516)
>        at
> org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:211)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:134)
>        at org.apache.camel.processor.RecipientList.process(RecipientList.java:102)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>        at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)
>        at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:273)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)
>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>        at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
>        at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:99)
>        ... 11 more
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/recipientList-onException-not-catching-CamelExchangeException-tp5701756.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: recipientList onException not catching CamelExchangeException

arda.aydin
Hi Claus,

You're right, sorry for the absence of version number (just an oversight).
First i was using 2.6.0 as i had no solution i also tried with 2.9.3-SNAPSHOT i still have this issue.

Cheers,
Arda
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: recipientList onException not catching CamelExchangeException

Claus Ibsen-2
Hi

I added an unit test. But I could not reproduce it on trunk or the 2.9 branch
http://svn.apache.org/viewvc?rev=1341957&view=rev

On Fri, May 11, 2012 at 8:42 AM, arda.aydin <[hidden email]> wrote:

> Hi Claus,
>
> You're right, sorry for the absence of version number (just an oversight).
> First i was using 2.6.0 as i had no solution i also tried with
> 2.9.3-SNAPSHOT i still have this issue.
>
> Cheers,
> Arda
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/recipientList-onException-not-catching-CamelExchangeException-tp5701756p5702241.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Loading...