IBM Support

OracleXAException which causes J2CA0030E, DSRA0304E, DSRA0300E, and J2CA0027E

Troubleshooting


Problem

WebSphere® Application Server logs several messages in SystemOut.log when this problem is encountered,
1. The first will likely be

[4/12/05 12:12:40:227 EDT] 701d7c1b XATransaction E J2CA0030E: Method enlist caught javax.transaction.SystemException: Failed to start the transaction association.
at com.ibm.ws.Transaction.JTA.TransactionImpl.enlistResource(TransactionImpl.java:1986)
...
Caused by: oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1270)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:318)


2. The next is the DSRA0304E. The Oracle Error code means this is Oracle error message, ORA-00600 due to an XAER_RMERR (a resource manager error).

[4/12/05 12:12:41:479 EDT] 701d7c1b WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
The XA Error is : -3
The XA Error message is : A resource manager error has occurred in the transaction branch.
The Oracle Error code is : 600
The Oracle Error message is: Internal XA Error
The cause is : null.


3. Then, this indicating that an error with XAER_RMERR occurred.

[4/12/05 12:12:41:479 EDT] 701d7c1b WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_RMERR. Exception is: 4.
[4/12/05 12:12:41:479 EDT] 701d7c1b XATransaction E J2CA0027E: An exception occurred while invoking start on an XA Resource Adapter from dataSource jdbc/wpsdbDS, within transaction ID {XID: formatId(57415344), gtrid_length(48), bqual_length(28), data(000000000000000500000003cc2eb9169d44e55406fa3ed0929193cda15d9d 665765625370686572655f506f7274616ccc2eb9169d44e55406fa3ed0929193cda15 d9d66000000030dfc5e73)}: oracle.jdbc.xa.OracleXAException

Cause

There are some commands that need to be run on the Oracle DB Server in order for it to support XA transactions.

Resolving The Problem

The solution is to run two scripts that are included in the Oracle directory. This will likely need to be performed by your Oracle DBA, since you must be logged into Oracle as SYSOPER or SYSDBA in order to have the necessary permissions for these scripts to work. The scripts are:

    • Directory: <ORACLE_HOME>\javavm\install
        • File: initxa.sql
        • File: initjvm.sql
The initxa.sql script configures the database for XA. Once it runs successfully, your database is configured for XA. The script might run successfully the first time you try. Unfortunately, it probably will not run successfully because some of the database's memory spaces are too small.

To fix this, run the initjvm.sql script. It will probably fail too, but in doing so it indicates which parameters need to be adjusted. The parameters are stored in this file:

    • Directory: <ORACLE_HOME>\database
        • File: init<DATABASE_SID>.ora
This table shows two parameters that typically need to be increased. Your particular database configuration might require adjusting different parameters.
Parameter Name Minimum Value
java_pool_size 12000000
shared_pool_size 24000000

Note, one may also see the following messages logged as well,

[4/12/05 12:12:41:479 EDT] 701d7c1b RegisteredRes E WTRN0078E: An attempt by the transaction manager to call start on a transactional resource has resulted in an error. The error code was XAER_RMERR. The exception stack trace follows: oracle.jdbc.xa.OracleXAException

[4/12/05 12:16:55:534 EDT] 73693c1a XARminst E WTRN0037W: The transaction service encountered an error on an xa_recover operation. The resource was J2CXAResourceInfo:
cfName = wpsdbDS

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"ARM Category":[{"code":"a8m50000000Cd9aAAC","label":"WebSphere Application Server traditional-All Platforms->J2C-ConnectionPooling-JDBCDrivers"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"8.5.5;9.0.5"},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
17 February 2022

UID

swg21215890