You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bruno Gonçalves (Jira)" <ji...@apache.org> on 2026/01/08 18:50:00 UTC
[jira] [Comment Edited] (CAMEL-22820) routeConfiguration onException does not propagate to direct endpoints for consumer-level exceptions
[ https://issues.apache.org/jira/browse/CAMEL-22820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050677#comment-18050677 ]
Bruno Gonçalves edited comment on CAMEL-22820 at 1/8/26 6:49 PM:
-----------------------------------------------------------------
??You need to add the same global route configuration to all the routes - its not the same as the regular route where onException is global for all 3 routes.??
Yes, now it works!
??There is an internal NPE that your reproducer demonstrates that we should fix - it only happens in bridge mode.??
Great! I’m glad I reported it.
was (Author: JIRAUSER303582):
??You need to add the same global route configuration to all the routes - its not the same as the regular route where onException is global for all 3 routes.??
Yes, now it works!
??There is an internal NPE that your reproducer demonstrates that we should fix - it only happens in bridge mode.??
Great! I’m glad I reported it.
> routeConfiguration onException does not propagate to direct endpoints for consumer-level exceptions
> ---------------------------------------------------------------------------------------------------
>
> Key: CAMEL-22820
> URL: https://issues.apache.org/jira/browse/CAMEL-22820
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp, camel-mail
> Affects Versions: 4.10.8, 4.10.9, 4.14.3
> Environment: Apache Camel *4.10.8,* *4.10.9-SNAPSHOT*
> Reporter: Bruno Gonçalves
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.10.9, 4.14.5, 4.18.0
>
> Attachments: error-handler-reproducer.zip
>
>
> When using {{routeConfiguration}} with {{onException}} in Java DSL, consumer-level exceptions (e.g. IMAP authentication failures) are only {*}partially handled{*}: processors like {{log:}} are executed, but routing to endpoints such as {{direct:}} does not occur.
> The same configuration *works as expected* when {{onException}} is declared directly in a {{{}RouteBuilder{}}}, but {*}fails when moved to {{RouteConfigurationBuilder}}{*}, even though the route references the configuration via {{{}routeConfigurationId{}}}.
> A *reproducer is attached* which contains {*}two cases{*}:
> # *Using {{routeConfiguration}}*
> ** {{onException}} is triggered
> ** {{log:}} endpoint is executed
> ** {{direct:}} endpoints are *not invoked*
> # *Using inline {{onException}} in {{RouteBuilder}}*
> ** Full error handling works as expected
> ** {{direct:}} routes are invoked correctly
> This behavior has been observed not only with {*}IMAP inbound consumers{*}, but also with {*}FTP inbound consumers{*}, suggesting the issue is *not specific to the Mail component* and may affect other polling or consumer-based endpoints as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)