WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Why does my WebSphere v8.5.5.x Application fail to start and thow java.sql.SQLException: Recovery failed unexpected problem log record is Not first but transaction is not in transaction table

  • 1.  Why does my WebSphere v8.5.5.x Application fail to start and thow java.sql.SQLException: Recovery failed unexpected problem log record is Not first but transaction is not in transaction table

    Posted Thu December 08, 2022 08:01 AM
    We are running WebSphere Application Server v8.5.5.x. One of our applications fail to start and throw the following error during the startup:

    FFDC Exception:javax.resource.spi.ResourceAllocationException SourceId:com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection ProbeId:299 Reporter:com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@a693d502
    javax.resource.spi.ResourceAllocationException: DSRA8100E: Unable to get a XAConnection from
    the DataSource jdbc/DefaultEJBTimerDataSource.
    at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2521)
    at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1848)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3831)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3079)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1554)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1033)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:644)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:611)
    at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl$DSWrapper.getConnection(DatabaseHelperImpl.java:1603)
    at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl.getConnection(DatabaseHelperImpl.java:751)
    at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl.getConnection(DatabaseHelperImpl.java:1373)
    at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl.connect(DatabaseHelperImpl.java:549)
    at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl.initialize(DatabaseHelperImpl.java:502)
    at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl.<init>(DatabaseHelperImpl.java:262)
    at com.ibm.ws.extensionhelper.impl.ExtensionHelperServiceImpl.getDatabaseHelper(ExtensionHelperServiceImpl.java:116)
    at com.ibm.ws.scheduler.DBHelperImpl.<init>(DBHelperImpl.java:108)
    at com.ibm.ws.scheduler.WASSchedulerCfgHelper.getDatabaseHelper(WASSchedulerCfgHelper.java:959)
    at com.ibm.ws.scheduler.WASSchedulerCfgHelper.verifyTables(WASSchedulerCfgHelper.java:526)
    at com.ibm.ws.runtime.component.EJBContainerImpl.createTimerTables(EJBContainerImpl.java:2471)
    at com.ibm.ws.runtime.component.EJBContainerImpl.getSchedulerInstance(EJBContainerImpl.java:1899)
    at com.ibm.ws.runtime.component.EJBContainerImpl.getTimerServiceScheduler(EJBContainerImpl.java:2526)
    at com.ibm.ws.runtime.component.WASEJBRuntimeImpl.getTimerServiceScheduler(WASEJBRuntimeImpl.java:1388)
    at com.ibm.ws.runtime.component.WASEJBRuntimeImpl.setupTimers(WASEJBRuntimeImpl.java:893)
    ..
    Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: Failed to start database 'WAS_INSTALL_ROOT/databases/EJBTimers/xxxServer/EJBTimerDB' with class loader com.ibm.ws.bootstrap.ExtClassLoader@7d1d4666, see the next exception for details. DSRA0010E: SQL State = XJ040, Error Code = 40,000
    ...
    Caused by: java.sql.SQLException: Failed to start database 'WAS_INSTALL_ROOT/databases/EJBTimers/xxxServer/EJBTimerDB' with class loader com.ibm.ws.bootstrap.ExtClassLoader@7d1d4666, see the next exception for details.
    Caused by: java.sql.SQLException: Recovery failed unexpected problem log record is Not first but transaction is not in transaction table : 58192078.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    Caused by: ERROR XSLAO: Recovery failed unexpected problem log record is Not first but transaction is not in transaction table : 58192078.

    How can we resolve these errors?

    ------------------------------
    Marcio D Amico
    ------------------------------


  • 2.  RE: Why does my WebSphere v8.5.5.x Application fail to start and thow java.sql.SQLException: Recovery failed unexpected problem log record is Not first but transaction is not in transaction table
    Best Answer

    Posted Thu December 08, 2022 08:05 AM
    Edited by GEETA NADELLA Thu December 08, 2022 08:11 AM
    @Marcio D'Amico,
    This error is usually caused by a corrupt Derby database. If you have a backup, restoring the derby database should fix the error. If you cannot restore the derby database from backup, follow the steps below which should help fix the errors:

    1.Stop the xxxServer

    2. Take a backup of this directory:
    WAS_INSTALL_ROOT/databases/EJBTimers/xxxServer/EJBTimerDB

    3.Then remove the directory:
    WAS_INSTALL_ROOT/databases/EJBTimers/xxxServer/EJBTimerDB

    4. Restart the xxxServer. The server should recreate the database (existing transactions will be removed, but they are not recoverable anyway without a backup).


    ​​

    ------------------------------
    GEETA NADELLA
    ------------------------------