XAResource.commit() Method Fails with ORA-24756 on a Transaction Branch. (Doc ID 221089.1)

Last updated on MAY 19, 2017

Applies to:

JDBC - Version 9.0.1.0 and later
Information in this document applies to any platform.
***Checked for relevance on 01-FEB-2016***

Symptoms

A Java JDBC application creates two XA transaction branches and inserts a row. The XA transaction ends for each transaction branch. When the branches are prepared using oxar1.prepare (xid1), you observe one branch returning XA_OK and the other returning XA_RDONLY.

Issuing XAResource.commit()on the branch that returned XA_RDONLY causes the global transaction (both branches) to fail. Neither commit or rollback can be completed and the database is left in an inconsistent state resulting in in-doubt transactions. Both transaction branches are accessing the same resource manager(RM), and, in this case, the same Oracle instance.

The branch which returns XA_RDONLY on the prepare method fails if either XAResource.commit() or XAResource.rollback() is attempt on the branch.

The application fails with the following exceptions.

oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at oracle.jdbc.xa.client.OracleXAResource.commit(OracleXAResource.java:590)
at XAProblem152397.main(XAProblem152397.java:129)

XA Error is -4
ORA-24756 transaction does not exist

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms