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

Claus Ibsen updated CAMEL-8765:
-------------------------------
    Fix Version/s: 2.14.3

> JpaConsumer - May poll too soon before JPA stuff is initialized
> ---------------------------------------------------------------
>
>                 Key: CAMEL-8765
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8765
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jpa
>    Affects Versions: 2.15.2
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.14.3, 2.16.0, 2.15.3
>
>
> There can be a NPE if the jpa consumer polls too soon
> {code}
> 2015-05-10 20:35:25,605 [ction.BookOrder] WARN  JpaConsumer                   
>  - Consumer Consumer[jpa://camelinaction.BookOrder] failed polling endpoint: 
> Endpoint[jpa://camelinaction.BookOrder]. Will try again at next poll. Caused 
> by: [java.lang.NullPointerException - null]
> java.lang.NullPointerException
>       at 
> org.apache.camel.component.jpa.JpaConsumer$1.doInTransaction(JpaConsumer.java:97)
>       at 
> org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
>       at org.apache.camel.component.jpa.JpaConsumer.poll(JpaConsumer.java:94)
>       at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>       at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to