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: Lately (2.14) NullPointerExceptions instead of TypeConversionExceptions
Date Sat, 29 Nov 2014 08:24:09 GMT
Hi

Can you paste the stacktrace where you get the NPE ?

On Fri, Nov 28, 2014 at 10:31 AM, dermoritz <tanteanni@hotmail.com> wrote:
> Some day ago i switched to camel 2.14 (mainly because of RoutePolicyFactory -
> a great idea!). But i also noticed on creating new routes with new
> processors/ aggregators i see many NullPointerExceptions in lines that use
> object from exchange.getIn().getBody(Some.class).
> In those cases the body was never empty (debugged it) but the type
> conversion was not possible. As soon as i use the correct type or use it
> without class parameter the NPEs are gone.
>
> The problem is that i often catch the TypeConversionException and rethrow it
> to give additional info. Should i change that code and catch NPE instead?
> Could this be related with 2.14?
>
> Thanks in advance
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Lately-2-14-NullPointerExceptions-instead-of-TypeConversionExceptions-tp5759751.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message