payara / Payara-Examples

Repository for Example Code to demonstrate Payara specific features
144 stars 177 forks source link

NullPointerException when running batch process in Payara Micro #97

Closed gustoneves closed 5 years ago

gustoneves commented 5 years ago

When running a simple chunk job the first it runs perfectly, but the next executions throw an exception stating that it can't find the given execution.

Caught throwable in main execution loop with Throwable message: null, and stack trace: java.lang.NullPointerException at com.ibm.jbatch.container.impl.BaseStepControllerImpl.updateBatchStatus(BaseStepControllerImpl.java:287) at com.ibm.jbatch.container.impl.BaseStepControllerImpl.markStepFailed(BaseStepControllerImpl.java:243) at com.ibm.jbatch.container.impl.BaseStepControllerImpl.markJobAndStepFailed(BaseStepControllerImpl.java:248) at com.ibm.jbatch.container.impl.BaseStepControllerImpl.execute(BaseStepControllerImpl.java:133) at com.ibm.jbatch.container.impl.ExecutionTransitioner.doExecutionLoop(ExecutionTransitioner.java:112) at com.ibm.jbatch.container.impl.JobThreadRootControllerImpl.originateExecutionOnThread(JobThreadRootControllerImpl.java:110) at com.ibm.jbatch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:80) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:143) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250) ]] [2019-02-22T09:24:00.145+0000] [] [WARNING] [] [com.ibm.jbatch.container.util] [tid: _ThreadID=157 _ThreadName=concurrent/__defaultManagedExecutorService-managedThreadFactory-Thread-2] [timeMillis: 1550827440145] [levelValue: 900] [[ Caught throwable from run(). Stack trace: java.lang.IllegalStateException: Couldn't find entry to update for id = 8 at com.ibm.jbatch.container.services.impl.JobStatusManagerImpl.updateJobBatchStatus(JobStatusManagerImpl.java:82) at com.ibm.jbatch.container.impl.JobThreadRootControllerImpl.persistJobBatchAndExitStatus(JobThreadRootControllerImpl.java:214) at com.ibm.jbatch.container.impl.JobThreadRootControllerImpl.endOfJob(JobThreadRootControllerImpl.java:200) at com.ibm.jbatch.container.impl.JobThreadRootControllerImpl.originateExecutionOnThread(JobThreadRootControllerImpl.java:128) at com.ibm.jbatch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:80) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:143) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250) ]]

the Job configuration is `<?xml version="1.0" encoding="UTF-8"?>

` And I haven't defined any data source. Thanks
Sonnenhut commented 4 years ago

could you give future people a hint on how to resolve this? Running into the same problem when running Batchlets.