【发布时间】:2014-02-20 15:52:18
【问题描述】:
我有一个在 WebLogic 上运行的 Oracle BPEL 流程,它使用数据库适配器在两个表中写入。
有两个表,TableA 和 TableB。 TableB 对 TableA 有一个外键。
我在 TableA 中使用 A_ID 创建一个条目的过程。当我使用 A_ID 作为 FK 在 TableB 中创建一个条目时,我得到一个约束异常。
奇怪的是,这上周有效,现在使用相同的数据,我得到了错误。
数据源设置为标准 - 非 XA 数据源。
这是抛出的异常:
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of
Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute
Failed Exception.
insert failed. Descriptor name: [Datawarehouse.TableB].
Caused by java.sql.BatchUpdateException: ORA-02291: integrity constraint
(DWH.TABLE_A_FK) violated - parent key not found
.
".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
</faultstring>
<faultactor/>
<detail>
<exception>ORA-02291: integrity constraint (DWH.TABLE_A_FK) violated - parent key not found</exception>
</detail>
</env:Fault>
【问题讨论】:
-
在配置数据库适配器时是否使用表之间的关联(主从)?
-
不,我没有。该过程在生产中运行多年没有问题,所以我没有考虑到这一点。
-
你能展示你的例外吗?
标签: oracle transactions bpel