I'm using a FlatFileItemReader to read my csv file. If it does not find the file it throws the exception :
And the batch stops.
org.springframework.batch.core.UnexpectedJobExecutionException: Failed to initialize the step
Caused by: org.springframework.batch.item.ItemStreamException: Failed to initialize the reader
Caused by: java.lang.IllegalStateException: Resource must exist: [class path resource [theFile.csv]]
Can I change this behavior?
So, I want to save an exit status in the ExecutionContext and pass to next step.
I'm using Spring batch 1.1.