You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ganesh Lokeshwara (JIRA)" <ji...@apache.org> on 2018/10/16 09:11:00 UTC

[jira] [Created] (CAMEL-12883) WeaveByType not working for OnExceptionDefinition in camel 2.21.0

Ganesh Lokeshwara created CAMEL-12883:
-----------------------------------------

             Summary: 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


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)