[ 
https://issues.apache.org/jira/browse/CAMEL-21954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-21954.
---------------------------------
    Resolution: Fixed

> camel-core - Route templates with onException does not work
> -----------------------------------------------------------
>
>                 Key: CAMEL-21954
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21954
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 4.8.2, 4.10.3, 4.11.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.12.0, 4.10.4, 4.8.7
>
>
> we have noticed a strange behavior beginning from Camel 4.8.2 concerning the 
> Exception Handling: routes, that are created based on a route template, 
> ignore completely the OnException clauses.
> routeTemplate("onexceptionreprotemplate")
>         .templateParameter("source")
>         .templateParameter("target")
>         .from("{{source}}")
>             .onException(Exception.class)
>                 .log(LoggingLevel.ERROR, "Exception was thrown")
>                 .markRollbackOnly()
>                 .end()
>             .log(LoggingLevel.INFO, "Starting the route")
>             .to("{{target}}")
>             .log(LoggingLevel.INFO, "Message sent");
> In Camel 4.8.1 and above, if the {{target}} throws an exception, the steps 
> inside the OnException are executed. This doesn't happen starting from Camel 
> 4.8.2. The route acts as if no OnException clause is defined.
> Routes, not created based on templates, are not impacted by the behavior 
> above. Steps inside the OnException are executed also in versions >= than 
> 4.8.2
> Could that be a bug introduced in 4.8.2 for routeTemplates



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to