afterProcess错误 - Spring批处理

时间:2017-11-28 08:10:58

标签: spring spring-batch

我遇到的Spring批处理应用程序存在问题。这是一个间歇性问题(发生在一天,然后在接下来的几天内正常工作) -

在这个应用程序中逐行读取多个csv文件并存储在数据库中,当对应于spring批处理代码的批处理脚本运行时,我在服务器上收到以下错误:

2017-11-28 03:30:11,878 ERROR [com.inetpsa.eur.batchs.adyen.listeners.AdyenItemListener] - Error in afterProcess.
2017-11-28 03:30:11,881 ERROR [org.springframework.batch.core.step.AbstractStep] - Encountered an error executing the step
org.springframework.batch.retry.RetryException: Non-skippable exception in recoverer while processing; nested exception is org.springframework.batch.core.listener.StepListenerFailedException: Error in onProcessError.
    at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor$2.recover(FaultTolerantChunkProcessor.java:282)
    at org.springframework.batch.retry.support.RetryTemplate.handleRetryExhausted(RetryTemplate.java:420)
    at org.springframework.batch.retry.support.RetryTemplate.doExecute(RetryTemplate.java:289)
    at org.springframework.batch.retry.support.RetryTemplate.execute(RetryTemplate.java:187)
    at org.springframework.batch.core.step.item.BatchRetryTemplate.execute(BatchRetryTemplate.java:213)
    at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor.transform(FaultTolerantChunkProcessor.java:291)
    at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:187)
    at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:74)
    at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:386)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264)
    at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
    at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:258)
    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)
Caused by: org.springframework.batch.core.listener.StepListenerFailedException: Error in onProcessError.
    at org.springframework.batch.core.listener.MulticasterBatchListener.onProcessError(MulticasterBatchListener.java:142)
    at org.springframework.batch.core.step.item.SimpleChunkProcessor.doProcess(SimpleChunkProcessor.java:130)
    at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor$1.doWithRetry(FaultTolerantChunkProcessor.java:228)
    at org.springframework.batch.retry.support.RetryTemplate.doExecute(RetryTemplate.java:240)
    ... 13 more
Caused by: java.lang.NullPointerException
    at com.inetpsa.eur.batch.adyen.executionstatus.AdyenBatchStatus.processErrors(AdyenBatchStatus.java:341)
    at com.inetpsa.eur.batchs.adyen.listeners.AdyenItemListener.onProcessError(AdyenItemListener.java:157)
    at com.inetpsa.eur.batchs.adyen.listeners.AdyenItemListener.onProcessError(AdyenItemListener.java:29)
    at org.springframework.batch.core.listener.CompositeItemProcessListener.onProcessError(CompositeItemProcessListener.java:84)
    at org.springframework.batch.core.listener.MulticasterBatchListener.onProcessError(MulticasterBatchListener.java:139)
    ... 16 more

NullPointer位于读取“item”的位置,间歇性地发生这种情况。

任何线索!

TIA!

0 个答案:

没有答案