【问题标题】:Oracle BPEL DB Adapter constraint exception when writing in two tables - suddenly broken写入两个表时的 Oracle BPEL DB 适配器约束异常 - 突然损坏
【发布时间】: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


【解决方案1】:

这与 Oracle BPEL 无关。由于某种原因,对表 A 的插入不成功,或者对表 A 的插入对表 B 不可见(第二个插入在不同的事务中)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-13
    • 2017-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多