Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12883

WeaveByType not working for OnExceptionDefinition in camel 2.21.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • 2.21.0
    • 2.23.0
    • camel-test
    • None
    • Unknown

    Description

      Below is my route

      OnException(Exception.class).handled(true).process(EXCEPTION_PROCESSOR).end()
      
      from("file:").process(SOME_PROCESSOR).to("file:");
      

      During testing i want to investigate each exchange which goes through OnException block , for which i tried below

      weaveByType(OnExceptionDefinition.class).after()
                          .to(assertEndpoint)
      

      when i ran the test i got below error

      java.lang.IllegalArgumentException: There are no outputs which matches: OnExceptionDefinition in the route
      

      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.

       

      @Override
      public boolean isUseAdviceWith() {
          return true;
      }
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            Ganesh.L Ganesh Lokeshwara
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: