Camel
  1. Camel
  2. CAMEL-4107

Error using multiple error handlers and onException (java.lang.IllegalStateException: SendProcessor has not been started)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.2
    • Fix Version/s: 2.8.0
    • Component/s: camel-core, camel-test
    • Labels:
      None

      Description

      When we use more than one errorHandler in our routes and onException, we face test failures with the following exception:
      java.lang.IllegalStateException: SendProcessor has not been started: sendTo(Endpoint[mock://custom])
      at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:94)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.RedeliveryErrorHandler.deliverToFailureProcessor(RedeliveryErrorHandler.java:621)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:242)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:189)[camel-core-2.7.2.jar:2.7.2]
      at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:121)[camel-core-2.7.2.jar:2.7.2]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_20]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_20]

        Activity

        Hide
        Nikolaos Dimos added a comment -

        Attached you can find two unit tests that instantiate two different camel contexts. One contains routes that reference one errorHandler and the other contains routes that reference two error handlers. The tests of the first camel context pass, while the tests of the second fail with the aforementioned exception.

        Show
        Nikolaos Dimos added a comment - Attached you can find two unit tests that instantiate two different camel contexts. One contains routes that reference one errorHandler and the other contains routes that reference two error handlers. The tests of the first camel context pass, while the tests of the second fail with the aforementioned exception.
        Hide
        Claus Ibsen added a comment -

        Can you re-attach the file, and this time mark [x] in grant license to Apache.

        Show
        Claus Ibsen added a comment - Can you re-attach the file, and this time mark [x] in grant license to Apache.
        Hide
        Nikolaos Dimos added a comment -

        Attaching again the file with Grant licence to ASF

        Show
        Nikolaos Dimos added a comment - Attaching again the file with Grant licence to ASF
        Hide
        Claus Ibsen added a comment -

        This issue is fixed on trunk.

        Show
        Claus Ibsen added a comment - This issue is fixed on trunk.
        Hide
        Nikolaos Dimos added a comment -

        Thanks for your reply.

        Show
        Nikolaos Dimos added a comment - Thanks for your reply.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Nikolaos Dimos
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development