I think there is a ticket logged about this, check the JIRA

On Wed, Feb 10, 2016 at 3:58 PM, Thomas Weinschenk
<thomas.weinsch...@infoserve.endress.com> wrote:
> Hi folks,
>
> I am working on a monitoring system to trace the traffic handled by camel.
> From importance is the failure handling of course.
> No I facing the problem that there is no Exception information within an
> onCompletion block accessible. Neither by exchange.getException() nor via
> the property CamelExceptionCaught (Exchange.EXCEPTION_CAUGHT).
>
> Here is an example route:
> from(direct:fail)
> .onCompletion().to("log:thisIsTheEnd?showAll=true").end()
> .throwException(new FileNotFoundException("doing"));
>
> It used to work with 2.12.4 but from 2.12.5 onwards there is no information
> about the exception anymore.
> Here are the example logs:
>
> *2.12.4:*
> [thisIsTheEnd] - Exchange[Id: ID-123-61128-1455114799503-0-3,
> ExchangePattern: InOnly,
> Properties: {CamelCorrelationId=ID-123-61128-1455114799503-0-2,
> CamelCreatedTimestamp=Wed Feb 10 15:33:19 CET 2016,
> CamelErrorHandlerHandled=false,
> CamelExceptionCaught=java.io.FileNotFoundException: doing,
> CamelFailureEndpoint=direct://fail, CamelFailureHandled=true,
> CamelFailureRouteId=FailRoute,
> CamelMessageHistory=[DefaultMessageHistory[routeId=FailRoute,
> node=onCompletion1], DefaultMessageHistory[routeId=FailRoute,
> node=throwException1], DefaultMessageHistory[routeId=FailRoute, node=to1]],
> CamelOnCompletion=true, CamelToEndpoint=log://thisIsTheEnd?showAll=true},
> Headers: {breadcrumbId=ID-123-61128-1455114799503-0-1,
> CamelRedelivered=false, CamelRedeliveryCounter=0},
> BodyType: String, Body: abc,
> CaughtExceptionType: java.io.FileNotFoundException,
> CaughtExceptionMessage: doing,
> StackTrace: java.io.FileNotFoundException: doing
>         ....stack trace...
> ,
> Out: null: ]
>
> *Since 2.12.5:*
> [thisIsTheEnd] - Exchange[Id: ID-123-61109-1455114738501-0-4,
> ExchangePattern: InOnly,
> Properties: {CamelCorrelationId=ID-123-61109-1455114738501-0-2,
> CamelCreatedTimestamp=Wed Feb 10 15:32:18 CET 2016,
> CamelFailureEndpoint=direct://fail, CamelFailureRouteId=FailRoute,
> CamelMessageHistory=[DefaultMessageHistory[routeId=FailRoute,
> node=onCompletion1], DefaultMessageHistory[routeId=FailRoute,
> node=throwException1], DefaultMessageHistory[routeId=FailRoute, node=to1]],
> CamelOnCompletion=true, CamelToEndpoint=log://thisIsTheEnd?showAll=true},
> Headers: {breadcrumbId=ID-123-61109-1455114738501-0-1,
> CamelRedelivered=false, CamelRedeliveryCounter=0},
> BodyType: String,
> Body: abc,
> Out: null: ]
>
>
> Regards,
> Thomas
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/onCompletion-has-no-Exception-CamelExceptionCaught-anymore-tp5777544.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to