1
votes

Our Spring Batch job failed abruptly while processing an input file. When i'm trying to rerun the batch job, its throwing the below message.

02:27:09.088 [main] DEBUG o.s.b.c.r.dao.JdbcStepExecutionDao - Truncating long message before update of StepExecution, original message is: org.springframework.batch.core.JobExecutionException: Cannot restart step from STARTING status. The old execution may still be executing, so you may need to verify manually that this is the case.

I know that if spring batch job fails abnormally then rewards_job_execution, batch_job_execution and batch_step_execution table wont get the proper status and end_time.

Is there any successful approach to complete/finish the current instance and start a new one?

2

2 Answers

0
votes

There is nothing within Spring Batch that will do that type of cleanup. The main reason is that typically the decision of what to do (Is the execution FAILED? Is it COMPLETE? Is it something else?) is typically a human decision at the job level. You'll need to handle the cleanup yourself.

0
votes

You should use skiplistener. To reslove this