0

getting the error in the title when trying to invoke a springbatchjob secondtime with the same xlsx file.

Technologies used : Springbatch,springboot,mysql,java,springbatchexcel.

1 Answers1

0

Without seeing your configuration, my expectation is that your ItemReader is not step scoped. Because of this, you use the same instance across multiple executions which can cause that error. I'd bet if you changed that reader to step scoped, the issue will go away.

Michael Minella
  • 20,843
  • 4
  • 55
  • 67