I am getting the below exception when doing a batch processing
encountered an error.org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
Could someone help me with what might be the issue?
Thanks.
Probably you have a checked exception somewhere in one of your beans that you catch in another one, but the transaction advice of spring notices it and will mark the transaction for rollback.
You can play with the noRollBackFor property of the Transactional annotation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With