oracle - spring batch insert into oracle database issue
问题描述
I have a spring batch example where I read from a Flat file and write into Oracle database. when I create the oracle table the first time using Oracle developer , the example work perfect , but when I delete all the records and run the spring batch example the application stay in running mode (stop at the point wher insert in table) and not finish until I manually (using oracle SQL Developer ) add a record in the table , so it s continue running and complete perfectly . Is that have a problem with the table that I'm using in oracle (I m not an expert in oracle database). any help or suggestion please?
解决方案
当您从应用程序运行 spring 批处理时,您是否提交了更改?在 Oracle 中进行大批量操作时,数据库会对表进行锁定,直到事务为committed
或rolled back
。如果您在从应用程序中运行批处理时没有这样做,我的猜测是,无论您在应用程序端做什么都是在表上放置一个锁,并且在commit
您通过添加手动更改之前不会删除锁记录到表中。尝试commit
在申请流程结束时添加一个点进行测试。
推荐阅读
- javascript - 商店分派后 Nuxt.js 触发中间件
- html - 如何更改 Chase Payment Iframe html 内容占位符?
- html - 分页后不会在打印时分页
- mysql - MySQL 获取所有出现次数超过平均出现次数的行
- python - Python:如何在不循环的情况下将行和列中的每个元素相乘
- powerbi - Power BI 工作区和应用工作区是一回事吗?
- python - 如何在使用格式化时从我的 for 循环中返回每个值
- lua - 圆-圆运动碰撞
- css - 在 css/bootstrap 中填充最大高度
- javascript - 如何开始使用可以搜索电子邮件并与其中的链接进行交互的程序