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

NPE in CamelInternalProcessor

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      Using Trace mode in Hawtio throws NPE when route uses <onException> to handle a business exception. Trace mode is successful (no NPE) when the route does not throw a business exception (i.e. route is successful).

      I suspect that the value of routeDefinition in BacklogTracerAdvice is null when <onException> handles an exception.

      CamelInternalProcessor$BacklogTracerAdvice
      public BacklogTracerAdvice
      (
          Queue<DefaultBacklogTracerEventMessage> queue, 
          BacklogTracer backlogTracer,
          ProcessorDefinition<?> processorDefinition, 
          ProcessorDefinition<?> routeDefinition, 
          boolean first
      )
      
      org.apache.camel.processor.CamelInternalProcessor
      522		String routeId = routeDefinition.getId();
      
      2014-04-08 09:15:24,036 ERROR {qtp1100200721-83}    [o.a.c.p.FatalFallbackErrorHandler]  \--> New exception on exchangeId: ID-RICHAOSU-ULX1310-54949-1396894883751-56-12
      java.lang.NullPointerException
          at o.a.c.p.CamelInternalProcessor$BacklogTracerAdvice.before(CamelInternalProcessor.java:522)
          at o.a.c.p.CamelInternalProcessor.process(CamelInternalProcessor.java:139)
          at o.a.c.p.FatalFallbackErrorHandler.process(FatalFallbackErrorHandler.java:42)
          at o.a.c.p.RedeliveryErrorHandler.deliverToFailureProcessor(RedeliveryErrorHandler.java:839)
          at o.a.c.p.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:337)
          at o.a.c.p.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
          at o.a.c.p.Pipeline.process(Pipeline.java:118)
          at o.a.c.p.Pipeline.process(Pipeline.java:80)
          at o.a.c.p.ChoiceProcessor.process(ChoiceProcessor.java:111)
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              richaosu Richard O'Sullivan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: