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

WeaveByType not working for OnExceptionDefinition in camel 2.21.0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.21.0
    • Fix Version/s: 2.23.0
    • Component/s: camel-test
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: