|
Problem(Abstract) |
When starting an Application Server with pending
transactions, you see the following error in the log files; note that the
presence of the com.ibm.ejs.j2c.J2CXAResourceFactory class in the Java™
stack indicates that this error was thrown when trying to recover a
transaction:
[3/9/04 14:45:26:094 MST] 333dceab J2CXAResource W J2CA0061W: Error
creating XA Connection and Resource com.ibm.ws.exception.WsException:
DSRA8100E: Unable to get a XAConnection from the DataSource.
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:244)
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:171)
at
com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:192)
at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:761)
at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:554)
at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:529)
at
com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:230)
at
com.ibm.ejs.jts.jta.recovery.XARecoveryData.recover(XARecoveryData.java:617)
at
com.ibm.ejs.jts.jta.recovery.XARecoveryManager.xaRestartRecovery(XARecoveryManager.java:515)
at
com.ibm.ejs.jts.jta.recovery.XARecoveryManager.duringRestart(XARecoveryManager.java:480) |
|
|
|
Cause |
There are pending transactions in the tranlog during
Application Server startup. |
|
|
Resolving the
problem |
Possible solutions to fix this problem:
- If you do not want to recover the pending XA Transactions
prior to this server startup, delete the files in the
tranlog/<Server-name>/ directory before starting the server.
- If you do want to recover the Pending XA transactions
prior to the server startup, make sure you have done one of the following:
- If Component Managed J2C Authentication Alias is
used with the datasource, set Resource Reference Authentication type to
Application.
- If Container Managed J2C Authentication Alias is
used with the datasource, set the Resource Reference Authentication type
set to Container.
While creating the resource reference in the binding tab, fill in the
JNDI name of the XA datasource. You can also provide the JNDI name during
the application installation step by mapping resource reference to
resources.
When using a resource reference, you must change the application code to
use it. For example, if the resource reference logical name is
myDataSource, the application's lookup calls look like this:
context.lookup("java:comp/env/myDataSource");
These Information Center links can help you configure the resource
reference:
Looking up data sources with resource reference for relational access
Creating or changing a resource reference |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|