admin管理员组文章数量:1302350
Using a fairly recent version of spring-batch (5.1.0)
we've had some runtime errors when two batches in separate linux
processes kick off at the same time.
The error occurs within the spring-batch
code that inserts into BATCH_JOB_INSTANCE
.
Exception in SpringApplication.run()
.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO BATCH_JOB_INSTA
NCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION)
VALUES (?, ?, ?, ?)
]; SQL state [72000]; error code [8177]; ORA-08177: can't serialize access for this transaction
I understand this to be a problem where the data in the BATCH_JOB_INSTANCE
table is changing at the same time that spring-batch
is trying to write to it.
What I don't understand is what the user of spring-batch
is supposed to do about this. I would think that this should be a framework issue rather than a user issue.
Thanks for any enlightenment and / or pointers.
-alan
Using a fairly recent version of spring-batch (5.1.0)
we've had some runtime errors when two batches in separate linux
processes kick off at the same time.
The error occurs within the spring-batch
code that inserts into BATCH_JOB_INSTANCE
.
Exception in SpringApplication.run()
.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO BATCH_JOB_INSTA
NCE(JOB_INSTANCE_ID, JOB_NAME, JOB_KEY, VERSION)
VALUES (?, ?, ?, ?)
]; SQL state [72000]; error code [8177]; ORA-08177: can't serialize access for this transaction
I understand this to be a problem where the data in the BATCH_JOB_INSTANCE
table is changing at the same time that spring-batch
is trying to write to it.
What I don't understand is what the user of spring-batch
is supposed to do about this. I would think that this should be a framework issue rather than a user issue.
Thanks for any enlightenment and / or pointers.
-alan
Share asked Feb 10 at 22:03 ALAN PAINTERALAN PAINTER 151 silver badge4 bronze badges 2- I guess that I'll have to ask the question to Copilot. – ALAN PAINTER Commented Feb 14 at 8:02
- I'm wondering if this problem isn't related to this issue: github/spring-projects/spring-batch/issues/2252 – al.truisme Commented Feb 25 at 13:14
1 Answer
Reset to default 0The question seems to be addressed here as well:
Spring Batch ORA-08177: can't serialize access for this transaction when running single job, SERIALIZED isolation level
You can set a different isolationLevelForCreate
, recommended to be READ_COMMITTED
.
https://docs.spring.io/spring-batch/reference/job/configuring-repository.html#txConfigForJobRepository
本文标签:
版权声明:本文标题:oracle database - spring-batch: getting SQL concurrency error on table BATCH_JOB_INSTANCE at start of job - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741688132a2392565.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论