I am getting this exception with SERIALIZED isolation level on JobRepository in Spring Batch:
org.springframework.dao.CannotSerializeTransactionException: Pr
When using serialized transactions you need to increase the initrans parameter on the table per the Oracle Docs. To handle serialized transactions this needs to be 3 or more.
alter table BATCH_.... INITRANS 3
My case when there is something happen on the DB side, re-run have the same problem.
To resolve I clean up all the table below and re-run seems fine after that.
We have tried jacking up INI_TRANS to 100 and we were still running into issues
I found this article that suggests adding ROWDEPENDENCIES to the creation of tables.
http://www.devx.com/dbzone/Article/41591?pf=true
For me with INI_TRANS & now ROWDEPENDENCIES the exceptions for Serialized have gone away.
Update: Turns out not to be a perfect solution. We did have one event of this SERIALIZED exception happen over night. Now that's much better as we had 100s of runs before a single failure but it appears that using ROWDEPENDENCIES isn't a yet a complete solution.