Description
Peter Schäfer opened BATCH-2475 and commented
When launching a Batch Job, the following exception is thrown:
2016-02-18 03:20:01.686 ERROR 16635 --- [nio-8082-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.CannotSerializeTransactionException: PreparedStatementCallback; SQL [INSERT into BATCH_JOB_INSTANCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION) values (?, ?, ?, ?)]; ORA-08177: can't serialize access for this transaction
; nested exception is java.sql.SQLException: ORA-08177: can't serialize access for this transaction
] with root cause
java.sql.SQLException: ORA-08177: can't serialize access for this transaction
See attached stack trace.
The error is hard to reproduce.
We tried the following work-around:
<batch:job-repository id="jobRepository"
...isolation-level-for-create="READ_COMMITTED"
... />
with little success.
Affects: 3.0.6
Reference URL: https://stackoverflow.com/questions/22364432/spring-batch-ora-08177-cant-serialize-access-for-this-transaction-when-running
Attachments:
- StackTrace.log (10.31 kB)
6 votes, 11 watchers