0 Replies Latest reply on Feb 20, 2012 7:55 AM by dolevd

    IllegalMonitorStateException when commiting JTA transaction (JBoss 4.2.3)

    dolevd

      Hi,

       

      We have an EJB3 based application running in a JBoss 4.2.3 cluster of 2 'all' instances.

      For the past 3 months, the application was working correctly, but lately, JBoss is throwing the following exception after the application runs for a while:

      (this exception is caused by a remote ejb invocation that occurs everytime the application starts but the exception usually doesn't get thrown.)

       

      {code}

      java.lang.IllegalMonitorStateException

      at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:125)

      at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1102)

      at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)

      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.unlock(BaseWrapperManagedConnection.java:278)

      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:81)

      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:936)

      at com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.commit(XAOnePhaseResource.java:110)

      at com.arjuna.ats.arjuna.LastResourceRecord.topLevelPrepare(LastResourceRecord.java:170)

      at com.arjuna.ats.arjuna.coordinator.AbstractRecord.topLevelOnePhaseCommit(AbstractRecord.java:441)

      at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2619)

      at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)

      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)

      at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)

      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)

      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)

      at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)

      at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)

      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)

      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)

      {code}

       

      After this error occurs, further attempts to execute queries result in the following exception:

       

      {code}

      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -4b9b87f8:87c6:4f40b573:6f1f status: ActionStatus.COMMITING >;

        - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -4b9b87f8:87c6:4f40b573:6f1f status: ActionStatus.COMMITING >)

      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)

      {code}

       

      Restarting the JBoss helps for a short while, but after some time the error returns.

       

      Searching the posts in this site (and in google) did not return anything relevant.

       

      Any ideas what can cause this exception?

       

      Thanks,

      Dolev