'ORA-02056: 2PC: 2PC state machine: bad two-phase command number 0 from prepared state(2) Error' Using WebLogic and XA When Reconnecting to the Database after Killing a Previous Connection (Doc ID 331703.1)

Last updated on MAY 15, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 10.1.0.2 [Release 9.2 to 10.1]
Information in this document applies to any platform.

Symptoms

Using BEA Weblogic and XA to connect to an Oracle database results in problems when the connection
to the database is killed. The transaction rolls back properly, but the next attempt to connect
to the database results in ORA-1591 'lock held by in-doubt distributed transaction' and ORA-2056
'2PC: 2PC state machine: bad two-phase command number 0 from prepared state(2)' error.

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