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

NPE when using the imap mail component with quartz or the timer and pollEnrich

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      There is a NPE when using the imap mail component with quartz or the timer and pollEnrich as dicussed here:
      http://camel.465427.n5.nabble.com/Schedule-file-mail-endpoint-td3356666.html#a3357538

      I reproduced it on version 2.10.3 and 2.10.4 with
      <route id="myTest">
      <from uri="timer://foo?fixedRate=true&period=10000"/>
      <pollEnrich uri="imap://userName@hostName?password=***"/>
      <to uri="log:testroute?showAll=true&level=INFO"/>
      </route>

      We need to use it with the quartz component (so we can use a cron expression), but get the same error
      <route id="myTest">
      <from uri="quartz://testTimer?cron=0+?"/>
      <pollEnrich uri="imap://userName@hostName?password=***"/>
      <to uri="log:testroute?showAll=true&level=INFO"/>
      </route>

      11/03/2013 10:32:04 [DefaultQuartzScheduler-context_Worker-1] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-W7-009430-52415-1362994261595-0-3 on ExchangeId: ID-W7-009430-52415-1362994261595-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExchangeException: Error occurred during aggregation. Exchange[Message: [Body is null]]. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: null. Exchange: Exchange[MailMessage: com.sun.mail.imap.IMAPMessage@411a3fe4]. Message: com.sun.mail.imap.IMAPMessage@411a3fe4]
      org.apache.camel.CamelExchangeException: Error occurred during aggregation. Exchange[Message: [Body is null]]. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due to: null. Exchange: Exchange[MailMessage: com.sun.mail.imap.IMAPMessage@411a3fe4]. Message: com.sun.mail.imap.IMAPMessage@411a3fe4]
      at org.apache.camel.processor.PollEnricher.process(PollEnricher.java:194)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:308)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)[camel-core-2.10.4.jar:2.10.4]
      at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)[camel-quartz-2.10.4.jar:2.10.4]
      at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:61)[camel-quartz-2.10.4.jar:2.10.4]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:216)[quartz-1.8.5.jar:]
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)[quartz-1.8.5.jar:]

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              sven 88 Sven Smets

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment