[ 
https://issues.apache.org/jira/browse/CAMEL-12883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654732#comment-16654732
 ] 

Claus Ibsen commented on CAMEL-12883:
-------------------------------------

The weave is only for manipulating routes, eg the stuff directly within the 
route. Your OnException is outside the route.

> WeaveByType not working for OnExceptionDefinition in camel 2.21.0
> -----------------------------------------------------------------
>
>                 Key: CAMEL-12883
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12883
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-test
>    Affects Versions: 2.21.0
>            Reporter: Ganesh Lokeshwara
>            Priority: Major
>
> Below is my route
> {code:java}
> OnException(Exception.class).handled(true).process(EXCEPTION_PROCESSOR).end()
> from("file:").process(SOME_PROCESSOR).to("file:");
> {code}
> During testing i want to investigate each exchange which goes through 
> OnException block , for which i tried below
> {code:java}
> weaveByType(OnExceptionDefinition.class).after()
>                     .to(assertEndpoint)
> {code}
> when i ran the test i got below error
> {code:java}
> java.lang.IllegalArgumentException: There are no outputs which matches: 
> OnExceptionDefinition in the route
> {code}
> Could you please help in resolving this issue? Please note i have tried 
> adding code mentioned below in test class, but still the same issue.
>  
> {code:java}
> @Override
> public boolean isUseAdviceWith() {
>     return true;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to