[ 
https://issues.apache.org/jira/browse/CAMEL-6154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-6154.
--------------------------------

    Resolution: Fixed

Okay I logged CAMEL-6193 to fix this better.
                
> NPE when using the imap mail component with quartz or the timer and pollEnrich
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-6154
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6154
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mail, camel-quartz
>    Affects Versions: 2.10.3, 2.10.4
>         Environment: Windows, Tomcat 7.0.32, java 7, Spring 3.1.4
>            Reporter: Sven Smets
>            Assignee: Claus Ibsen
>              Labels: imap, pollenrich, quartz, timer
>             Fix For: 2.10.5, 2.11.0
>
>         Attachments: error log.txt
>
>
> 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&amp;period=10000"/>
>      <pollEnrich uri="imap://userName@hostName?password=***"/> 
>      <to uri="log:testroute?showAll=true&amp;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&amp;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:]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to