On Fri, Aug 21, 2009 at 7:55 PM, boday<[email protected]> wrote:
>
> good call Claus, that seems to be the issue.  I was able to handle it with
> the  onException(Exception.class) defined.  Also, I tried throwing an
> explicit IOException and catching it with onException(IOException.class) and
> that worked as well.
>
> So the issue appears to be with custom exception types.  Is there anything
> special that I need to do to get these exceptions to work?  The exception
> classes are defined in an external jar file that I reference as a dependency
> in both my servicemix-bean SU and servicemix-camel SU.  The classes
> themselves are very simple and just extend the base java.lang.Exception
> class...
>

Which version of Camel are you using? I believe older versions do not
detect to well wrapped exceptions.
But its a bit strange your class is not picked up. You can always debug :)

> One other comment, it doesn't seem to forward the exception to my queue,
> using this...
>
> onException(IOException.class).handled(true).maximumRedeliveries(0).to("activemq:NFNoHandlerExceptions");
>
> I know the exception is being caught though because it hits my breakpoint
> when I just forward to a processor method()...
>
> onException(IOException.class).handled(true).maximumRedeliveries(0).process(new
> MyFunctionFailureHandler())
>
> Any thoughts?
>

Yeah when you use handled(true) you take care of the exception so the
exception is gone.
Its like try .. catch where you do handle it as well.

The caused exception could be stored as a property on the Exchange so
take a look at that one in your my function failure handler.


> thanks again...
>
>
> Claus Ibsen-2 wrote:
>>
>> Try with onException(Exception.class) to catch all exceptions to see if it
>> then
>> handles it.
>>
>
>
> -----
> Ben - Senior Consultant
>
> --
> View this message in context: 
> http://www.nabble.com/SMX-Camel---no-handler-found-for-message-tp25067044p25084564.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to