Application generates XAException, with error code XAER_INVAL, when using Oracle® Java™ Database Connectivity (JDBC™) driver
 Technote (troubleshooting)
 
Problem(Abstract)
Your application receives a XAException, with error code XAERR_INVAL, when using a Oracle JDBC Driver for its XA datasource. The same application works on a different server with identical configurations and software levels.
 
Cause
An excerpt of the stack trace from the Application Server SystemOut.log looks like this:
[1/7/04 10:50:49:863 EST]   2e2481 WSRdbXaResour W DSRA0302E:  XAException occurred.  Error code is: XAER_INVAL.  Exception is: <null>
[1/7/04 10:50:49:869 EST]   2e2481 XATransaction E J2CA0027E: An exception occurred while invoking start on an XA Resource Adapter from dataSource jdbc/flwnbesDataSource, within transaction ID {XID: formatId(57415344), gtrid_length(26), bqual_length(25), data(00000001 01148938 2C68EB1E 0605489C 6F99AF35 01E5650C D8240189 382C68EB 1E060548 9C6F99AF 3501E565 0CD8245C 2A7A00)}: javax.transaction.xa.XAException
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:85)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start(WSRdbXaResourceImpl.java:807)
at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1402)
at com.ibm.ejs.jts.jta.WSResourceImplBase.start(WSResourceImplBase.java:164)
at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:730)
at com.ibm.ejs.jts.jta.JTSXA.enlist(JTSXA.java:998)
at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:737)
at com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:743)
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1299)
at com.ibm.ws.rsadapter.cci.WSRdbConnectionImpl.enlistIfNecessary(WSRdbConnectionImpl.java:486)
at com.ibm.ws.rsadapter.cci.WSInteractionImpl.execute(WSInteractionImpl.java:324)
at com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.executeFinder(WSRelationalRAAdapter.java:274)
at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.executeOneRowFBPK(Unknown Source)

If you look up a few lines before the XAException occurred, you will find the Oracle database version and the Oracle JDBC driver being used for the XA datasource:

[1/7/04 10:50:49:604 EST]   2e2481 WSRdbDataSour u Database version is Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
[1/7/04 10:50:49:606 EST]   2e2481 WSRdbDataSour u JDBC Driver version is 8.1.6.0.1

In the above example, the Oracle database version is 9.2.0.4.0 and the Oracle JDBC driver is 8.1.6.0.1. All releases of Oracle JDBC drivers version 8.1.6 do not support XA, which causes this XAException. Oracle JDBC driver version 8.1.7 is the first Oracle JDBC version that supports the XA protocol.
 
Resolving the problem
Upgrade your Oracle JDBC Driver to version 8.1.7.4.0 or 9.2.0.3.0. You can get the latest Oracle JDBC drivers http://otn.oracle.com/software/index.html; select Oracle JDBC Drivers at the Technologies, Utilities, Drivers section.

Note: In the example above, we recommend that you use 9.2.0.3.0. Version 9.2.3.0 is the current version available that is at the same release level (9i Release 2) as the Oracle database being used.
  1. If the problem persists after upgrading the Oracle JDBC driver to the recommended level (for example, 9.2.0.3.0), WebSphere Application Server might find another copy of the Oracle JDBC driver within its CLASSPATH when loading the Java virtual machine (JVM™).

    In this case:
  • Search your $WAS_HOME directory (the directory where WebSphere Application Server is installed) and its subdirectories for a duplicate occurrence of the Oracle JDBC driver. If found, remove it.

    Note: The default file name of the Oracle JDBC driver is classes12.zip. However, be aware that vendors sometimes rename the classes12.zip file to some other name.
  • Ensure that your enterprise application, or enterprise archive (EAR), doesn't include the Oracle JDBC Driver.

The reason why the same application works on a different server with the same configurations and software levels is that a copy of the Oracle JDBC driver existed in your $WAS_HOME directory structure. After removing the duplicate copy of the Oracle JDBC driver, the application runs successfully.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Transaction Service (JTS)
Operating system(s): Windows
Software version: 5.0.2.4
Software edition:
Reference #: 1163039
IBM Group: Software Group
Modified date: Mar 11, 2004