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

Claus Ibsen resolved CAMEL-7786.
--------------------------------
    Resolution: Cannot Reproduce
      Assignee: Claus Ibsen

> Global exception handling breaks routeId
> ----------------------------------------
>
>                 Key: CAMEL-7786
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7786
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.0
>            Reporter: Serge Smertin
>            Assignee: Claus Ibsen
>
> This is somehow related to CAMEL-2109. Using Java DSL and code like
> {code}
> onException(Error.class).to("errorChannel");
> from(somethingChannel).routeId("triggerDoingSomething")
>                 .inOnly("bean:foo")
>                 .inOnly("bean:blah");
> /// later doing
> context.getRouteDefinition("triggerDoingSomething").adviceWith(context, new 
> AdviceWithRouteBuilder() {
>                 @Override
>                 public void configure() throws Exception {
>                     weaveAddFirst().process(new Processor() {
>                         @Override
>                         public void process(Exchange exchange) throws 
> Exception {
>                             dumpSomeValues();
>                         }
>                     });
>                 }
>             });
> {code}
> does not work, as {code}OnException[[class java.lang.Error] -> 
> [To[errorChannel]]]{code} has no parent and `AdviseWithTask` never gets 
> `match = true` in a loop. I guess it would not even work with multiple 
> OnException definitions.
> Exception thrown with this code is generated by
> {code}
> if (!match) {
>                     throw new IllegalArgumentException("There are no outputs 
> which matches: " + matchBy.getId() + " in the route: " + route);
>                 }
> {code}
> workaround? `weaveByType(OnExceptionDefinition.class)`? Ideas? Is it the 
> right use of route identifiers?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to