You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the spring batch version 4.3.7 I have created a simple application which has USER entity. The RepositoryItemReader builds the reader using the JPA repository, and the step configuration is done with Chunk size 10, input and output as the same entity object (User).
In the Processor each item (User) is set with the status='PROCESSED'.
Writer writes the entity finally to the database.
There are total of 99 records.
When the batch starts it fails to complete with the error.
Workaround: To fix this issue I tried with the stepBuilder chunk with 2 different input and output, it works fine with no stuck situation.
I have the complete code in the GitHub for review.
12:59:47.946 [taskExecutor-1] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Deadlock found when trying to get lock; try restarting transaction
Using the spring batch version 4.3.7 I have created a simple application which has USER entity. The RepositoryItemReader builds the reader using the JPA repository, and the step configuration is done with Chunk size 10, input and output as the same entity object (User).
In the Processor each item (User) is set with the status='PROCESSED'.
Writer writes the entity finally to the database.
There are total of 99 records.
When the batch starts it fails to complete with the error.
Workaround: To fix this issue I tried with the stepBuilder chunk with 2 different input and output, it works fine with no stuck situation.
I have the complete code in the GitHub for review.
https://github.com/manoop/batch/tree/bugfix/thread-transaction
BATCH CONFIG
Processor
Writer
The text was updated successfully, but these errors were encountered: