PQ76262: WSVR0003E WSVR0009E CLASSCASTTEXCEPTION ORACLEDATASTOREHELPER UNEXPECTED TRANSACTIONS IN TRANLOG PREVENTS SERVER FROM STARTING

APAR status
Closed as program error.

Error description
The application JVM crashed for reasons unknown.  When the
application restarted it was found that both the MQ server and
the Oracle database had been left in an inconsistent state.
WebSphere - as the transaction manager - should have been able
to recover the transaction and continue.
  -
The WebSphere Logs show:
PMGR6022E: Error using adapter to create or execute an
Interaction.com.ibm.ws.rsadapter.cci.WSInteractionImpl@3f4f44
 and
java.sql.SQLException: ORA-01591: lock held by in-doubt
distributed transaction 1.37.3426
 -
The problem can be recreated by putting unexpected transactions
in the tranlog. The following errors are seen when the
Application Server is started:
WSVR0003E: Server server1 failed to start
 com.ibm.ejs.jts.jta.recovery.XARecoveryManager$RecoveryError:
 java.lang.ClassCastException:
 javax.transaction.xa.XAException caught by XA recovery manager
  at com.ibm.ejs.jts.jta.recovery.XARecoveryManager.
  xaRestartRecovery(XARecoveryManager.java:565)
WSVR0009E: Error occurred during startup
  --
The analysis shows that  Oracle threw an Exception, but the
J2C code did not process the exception correctly and managed
to get the ClassCastException. The class cast was being done
OracleDataStoreHelper.
Local fix
To clear out the transactions do the follow:
SQL> execute dbms_transactions.purge_lost_db_entry
('<local trans id>');
Clear the WebSphere "tranlog" directory.
Then the Application Server will start.
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 5.0 users of    *
*                 Oracle DataSources with XA Recovery.         *
****************************************************************
* PROBLEM DESCRIPTION: A ClassCastException can occur during   *
*                      an XA recovery for Oracle Connections.  *
*                      This only occurs if an exception is     *
*                      thrown from Oracle during recovery.     *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
When an exception is thrown from Oracle during recovery, the
Relational Resource Adapter was casting the XAException to the
OracleXAException, this results in a ClassCastException because
Oracle actually throws an XAException.
The original exception from Oracle needs to be examined in
order to resolve the root problem, but this i-fix will prevent
the ClassCastException, and allow recovery to continue.
Problem conclusion
Checked for instanceof OracleXAException in the
OracleDataStoreHelper.java file.  This avoids the cast for
XAExceptions.
Temporary fix
Sent a test i-fix to the customer on 7-17.  Waiting for their fe
edback.
Comments
APAR information
APAR number PQ76262
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00S
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2003-07-11
Closed date 2003-09-18
Last modified date 2003-09-18

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
RRA          

Publications Referenced

Fix information

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00P PSY    UP
R00S PSY    UP
R00W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00S
Software edition:
Reference #: PQ76262
IBM Group: Software Group
Modified date: Sep 18, 2003