j vh created CAMEL-18262:
----------------------------

             Summary: Templated route exception handling not working
                 Key: CAMEL-18262
                 URL: https://issues.apache.org/jira/browse/CAMEL-18262
             Project: Camel
          Issue Type: Bug
          Components: came-core
    Affects Versions: 3.18.0
         Environment: * Camel 3.18.0
 * Spring-boot 2.7.1
            Reporter: j vh


Using Route Templates as described here in the Camel docs: [route-template, 
|https://camel.apache.org/manual/route-template.html]I cannot get any exception 
handling to work unless I define it within the class that is constructing the 
template itself.
Specifically,  trying to use global exception handling in the class that calls 
TemplatedRouteBuilder.builder() to build a route from my template. Expected 
exceptions are not caught.
And there is no .onException() method implementation to customize the handling 
that could be called in the list of fluent methods starting with 
TemplatedRouteBuilder.build().

I have already posted this, with my example code, in the Camel mailing list. 
Please have a look at the discussion here: 
[mail-archive|[https://lists.apache.org/thread/26kp2tpfbgj9mxpfdr106f36xyj51d7g|https://lists.apache.org/thread/26kp2tpfbgj9mxpfdr106f36xyj51d7g].]].

This is the hi-level description from that mail article:
{code:java}
Hi-level overview:
- 2 projects: 1 camel template base jar and 1 springboot camel application 
(that builds its route using the template from the other project).
- the base jar builds a route template
- the application jar builds a route using the template from the base jar
- the desire here is to do some extra customization in the application (at 
templated-route creation time) to setup extra exception handling that is not 
included in the base template.
- I have also tried to define global level exception handling using 
onException() in my application project's configure() method. But this is not 
catching anything either.
 {code}
There is a overview of the code in the mail article as well. But I also have a 
simplified single spring-boot test project with junit that I can provide if 
needed.



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

Reply via email to