|
Problem(Abstract) |
IBM® WebSphere® Application Server V5 JVM does not startup
cleanly and the WTRN0005W, J2CA0061W, and DSRA8100E error codes appear in
the logs.
When the Oracle database goes down during an in-flight (or indoubt)
transaction, a subsequent application server JVM restart results in
numerous errors being logged to the SystemOut.log file:
J2CA0061W: Error creating XA Connection and Resource
com.ibm.ws.exception. WsException: DSRA8100E: Unable to get a XAConnection
from the DataSource. with SQL State : null SQL Code : 17433
...
---- Begin backtrace for nested exception
java.sql.SQLException: invalid arguments in call
...
WTRN0005W: The XAResource for a transaction participant could not be
recreated and transaction recovery may not be able to complete
properly. |
|
|
|
Cause |
The full stack traces of the errors from the SystemOut.log
will look similar to this:
[4/8/05 11:58:43:472 CDT] 1ea6975 J2CXAResource W J2CA0061W: Error
creating XA Connection and Resource com.ibm.ws.exception. WsException:
DSRA8100E: Unable to get a XAConnection from the
DataSource. with SQL State : null SQL Code : 17433
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:184)
at oracle.jdbc.driver.OracleConnection.<init>
(OracleConnection.java:365)
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:169)
at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:169)
at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:301)
at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:86)
at
com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:914)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:909)
at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:716)
at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:741)
at
com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:174)
at
com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:660)
at
com.ibm.ws.Transaction.JTA.RecoveryManager.resync(RecoveryManager.java:1415)
at com.ibm.ws.Transaction.JTA.ResyncThread.run
(RecoveryManager.java:1448)
Caused by: java.sql.SQLException: invalid arguments in call
DSRA0010E: SQL State = null, Error Code = 17,433
... 20 more
---- Begin backtrace for nested exception
java.sql.SQLException: invalid arguments in call
DSRA0010E: SQL State = null, Error Code = 17,433DSRA0010E: SQL State =
null, Error Code = 17,433 at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:184)
at oracle.jdbc.driver.OracleConnection.<init>
(OracleConnection.java:365)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347) at
oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:169)
at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:169)
at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:301)
at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:86)
at
com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:914)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:909)
at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:716)
at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:741)
at
com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:174)
at
com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:660)
at com.ibm.ws.Transaction.JTA.RecoveryManager.resync
(RecoveryManager.java:1415) at
com.ibm.ws.Transaction.JTA.ResyncThread.run
(RecoveryManager.java:1448)
[4/8/05 11:58:43:475 CDT] 1ea6975 XARecoveryDat W WTRN0005W: The
XAResource for a transaction participant could not be recreated and
transaction recovery may not be able to complete properly. The resource
was J2CXAResourceInfo :cfName = jtavO1DSXA configProps = [Deployed
Resource Adapter Properties] TransactionResourceRegistration
java.lang.String dynamic InactiveConnectionSupport java.lang.Boolean true
secureMode boolean true
dd = [Resource Adapter DD]
ManagedConnectionFactory Class Name:
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl
Transaction Support: 2
Reauthentication Support: false
mcfProps = com.ibm.ejs.j2c.ManagedConnectionFactoryProps@12eea70
mmProps = {BasicPassword=javax.resource.spi.security.PasswordCredential,
authMechanismPreference=BASIC_PASSWORD}
mbeanProps = MBeanProps@1215fab authMechPref=0 category=
factoryId=cells/intcell/resources.xml#DataSource_11085666
factoryName=WebSphere:name=jtavO1DSXA,process=i02jvm,platform
=common,node=hxiapa03,JDBCProvider=Oracle JDBC D
(XA),Server=i02jvm,version=5.0,type=DataSource,mbeanIdentifie
r=cells/intcell/resources.xml#DataSource_11085666
68395,cell=intcell jndiName=jdbc/jtavO1DSXA mbeanType=DataSource
name=jtavO1DSXA parentType=JDBCProvider pmiName=null
providerId=cells/intcell/resources.xml#JDBCProvider_1090867251616
providerName=WebSphere:name=Oracle JDBC D
(XA),process=i02jvm,platform=common,node=hxiapa03,Server=i02jvm,
version= 5.0,type=JDBCProvider,mbeanIdentifier=
cells/intcell/resources.xml#JDBCProvider_1090867251616,cell=intcell
secureMode = true cmConfig = [Resource-ref settings]
res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]
isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)
recoveryClasspath = /opt/WebSphere/AppServer/lib/rsadapter.rar baseCfName
= jtavO1DSXA
. The exception stack trace follows:
com.ibm.ws.Transaction.XAResourceNotAvailableException: Error creating
XAResource: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException:
DSRA8100E: Unable to get a XAConnection from the DataSource. at
com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:183)
at
com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:660)
at
com.ibm.ws.Transaction.JTA.RecoveryManager.resync(RecoveryManager.java:1415)
at com.ibm.ws.Transaction.JTA.ResyncThread.run(RecoveryManager.java:1448)
Sequence of events to produce error:
- WebSphere Application Server and Oracle database involved in
transaction.
- Oracle database crashes, or stops.
- Application server JVM is restarted.
- WebSphere transaction manager attempts to recover inflight
transaction.
The problem occurs because the transaction manager cannot obtain the
proper credentials to make a database connection. In this particular case,
the application code during normal runtime pulls the database credentials
from a properties file. The data source in the WebSphere Application
Server configuration does not have a component-managed authentication
alias defined on it.
This works fine when the application is running normally. However, when
the transaction manager attempts to rebuild the connection to the database
in order to recover the inflight transaction, it does not have access to
the application's properties file. This causes the error
"javava.sql.SQLException: invalid arguments in call" to occur. |
|
|
Resolving the
problem |
To resolve this problem, a component-managed
authentication alias must be configured on the Oracle datasource.
These documents provide more information on how to accomplish this
task:
Data source settings
http://publib.boulder.ibm.com/infocenter/ws51help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/udat_jdbcdatsordet.html
Creating and configuring a data source using the administrative
console
http://publib.boulder.ibm.com/infocenter/ws51help/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tdat_ccrtpds.html
|
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|