2 Replies Latest reply on May 23, 2014 3:12 AM by nimit Agrawal

    LockingMode.PESSIMISTIC in infinispan for modeshape throwing errors.

    nimit Agrawal Newbie

      Hi


      I am using JBOSS EAP 6.1.0 + Modeshape 3.7.1 +  Infinispan5.2.7.FINAL + MS SQLSERVER database .

      Everything is working very fine and smooth till i m using LockingMode.OPTIMISTIC .


      When i am trying to use PESSIMISTIC lock mode i get a lots of error.

      While retrieving data there is no problem. I get errors only while saving data to the repository


      My Infinispan configuration :


      ManagedConnectionFactoryConfigurationBuilder<JdbcStringBasedCacheStoreConfigurationBuilder> cacheConfig = builder
                          .clustering()
                          .cacheMode(CacheMode.REPL_SYNC)
                          .transaction()
                          .transactionManagerLookup(new GenericTransactionManagerLookup())
                          .transactionMode(TransactionMode.TRANSACTIONAL)
                          .lockingMode(LockingMode.PESSIMISTIC)
                          .loaders()
                          .addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class)
                          .fetchPersistentState(false).ignoreModifications(false)
                          .purgeOnStartup(false).table()
                          .dropOnExit(false)
                          .createOnStart(false)
                          .tableNamePrefix("Modeshape")
                          .idColumnName("ID_COLUMN")
                          .idColumnType("VARCHAR(255)")
                          .dataColumnName("DATA_COLUMN")
                          .dataColumnType("VARBINARY(max)")
                          .timestampColumnName("TIMESTAMP_COLUMN")
                          .timestampColumnType("BIGINT")
                          .dataSource();
      

       

       

      Datasource :

       

      <datasource jndi-name="java:/testDS" pool-name="testDS" enabled="true">
                          <connection-url>jdbc:sqlserver://Cyd-db-02:1433;databaseName=test</connection-url>
                          <driver>sqljdbc</driver>
                          <new-connection-sql>SELECT 1;</new-connection-sql>
                          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                          <security>
                              <user-name>username</user-name>
                              <password>password</password>
                          </security>
                          <validation>
                              <check-valid-connection-sql>SELECT 1;</check-valid-connection-sql>
                              <validate-on-match>false</validate-on-match>
                              <background-validation>true</background-validation>
                              <background-validation-millis>30000</background-validation-millis>
                          </validation>
       </datasource>
      
       <drivers>
                          <driver name="sqljdbc" module="com.microsoft.sqlserver.jdbc">
                              <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                          </driver>
      </drivers>
      

       

       

      Exceptions while saving data:

       

      11:12:26,850 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (modeshape-gc-6-thread-1) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: This might be related to https://jira.jboss.org/browse/ISPN-604

        at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:96) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:228) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:87) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:213) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.loaders.AbstractCacheStore.applyModifications(AbstractCacheStore.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.loaders.AbstractCacheStore.prepare(AbstractCacheStore.java:144) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:300) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:206) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:106) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:108) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:103) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:128) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:115) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitPrepareCommand(TransactionSynchronizerInterceptor.java:61) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:189) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:93) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:175) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)

        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)

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

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

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

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

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

        at org.modeshape.jcr.txn.Transactions$SimpleTransaction.commit(Transactions.java:296) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:472) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:420) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.SystemContent.save(SystemContent.java:111) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$RunningState.cleanUpLocks(JcrRepository.java:1791) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$LockGarbageCollectionTask.doRun(JcrRepository.java:2125) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$BackgroundRepositoryTask.run(JcrRepository.java:2095) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_45]

        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [rt.jar:1.7.0_45]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_45]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction

        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)

        at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:93) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        ... 65 more

      Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction

        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:362)

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)

        ... 66 more

      Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffff0a630b62:782c0478:537dba76:2d7f status: ActionStatus.COMMITTED >

        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:352)

        ... 68 more

      11:12:26,854 ERROR [org.infinispan.transaction.TransactionCoordinator] (modeshape-gc-6-thread-1) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: This might be related to https://jira.jboss.org/browse/ISPN-604

        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:351) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:175) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)

        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)

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

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

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

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

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

        at org.modeshape.jcr.txn.Transactions$SimpleTransaction.commit(Transactions.java:296) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:472) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:420) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.SystemContent.save(SystemContent.java:111) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$RunningState.cleanUpLocks(JcrRepository.java:1791) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$LockGarbageCollectionTask.doRun(JcrRepository.java:2125) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$BackgroundRepositoryTask.run(JcrRepository.java:2095) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_45]

        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [rt.jar:1.7.0_45]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_45]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: org.infinispan.loaders.CacheLoaderException: This might be related to https://jira.jboss.org/browse/ISPN-604

        at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:96) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:228) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:87) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:213) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.loaders.AbstractCacheStore.applyModifications(AbstractCacheStore.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.loaders.AbstractCacheStore.prepare(AbstractCacheStore.java:144) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:300) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:206) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:106) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:108) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:103) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:128) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:115) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitPrepareCommand(TransactionSynchronizerInterceptor.java:61) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:189) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:93) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        ... 23 more

      Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction

        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)

        at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:93) [infinispan-cachestore-jdbc-5.2.7.Final.jar:5.2.7.Final]

        ... 65 more

      Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction

        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:362)

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)

        ... 66 more

      Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffff0a630b62:782c0478:537dba76:2d7f status: ActionStatus.COMMITTED >

        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:352)

        ... 68 more

      11:12:26,880 WARN  [com.arjuna.ats.jta] (modeshape-gc-6-thread-1) ARJUNA016029: SynchronizationImple.afterCompletion - failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=[Content-15985, Content-4217], isMarkedForRollback=false, lockedKeys=null, backupKeyLocks=[4f9be05317f1e7mode:locks], topologyId=2, isFromStateTransfer=false} org.infinispan.transaction.synchronization.SyncLocalTransaction@20c} org.infinispan.transaction.synchronization.SynchronizationAdapter@22b with exception: org.infinispan.CacheException: Could not commit.

        at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:83) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)

        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)

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

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

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

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

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

        at org.modeshape.jcr.txn.Transactions$SimpleTransaction.commit(Transactions.java:296) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:472) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:420) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.SystemContent.save(SystemContent.java:111) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$RunningState.cleanUpLocks(JcrRepository.java:1791) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$LockGarbageCollectionTask.doRun(JcrRepository.java:2125) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at org.modeshape.jcr.JcrRepository$BackgroundRepositoryTask.run(JcrRepository.java:2095) [modeshape-jcr-3.7.1.Final.jar:3.7.1.Final]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_45]

        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [rt.jar:1.7.0_45]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_45]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: javax.transaction.xa.XAException

        at org.infinispan.transaction.TransactionCoordinator.handleCommitFailure(TransactionCoordinator.java:224) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:177) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81) [infinispan-core-5.2.6.Final.jar:5.2.6.Final]

        ... 21 more

       

       

      Thanks in advance.

        • 1. Re: LockingMode.PESSIMISTIC in infinispan for modeshape throwing errors.
          Horia Chiorean Master

          The stack traces that you pasted all come from a background thread which ModeShape uses to clean up locks. So in theory, it shouldn't affect your main data from being persisted.

           

          That being said:

          • does this happen outside of a cluster, in a single node ? (you seem to be running clustered in EAP, but not using the EAP subsystem for clustering)
          • did you try the latest ModeShape 3.x release - 3.7.4 ? We did add some fail-safe code around the cleanup of locks
          • did you try using the latest EAP ? (6.2.0.GA) It's important to try a newer version of Infinispan, just in case it's an Infinispan issue (we've tested 3.x with Infinispan up to 5.2.10.Final)

           

          [ISPN-604] Re-design CacheStore transactions - JBoss Issue Tracker is a known and real limitation of ISPN, which *might be relevant* in a cluster. If that is the case, I don't think that we can do anything about it in 3.x.

          • 2. Re: LockingMode.PESSIMISTIC in infinispan for modeshape throwing errors.
            nimit Agrawal Newbie

            Hi

             

            The stack traces that you pasted all come from a background thread which ModeShape uses to clean up locks. So in theory, it shouldn't affect your main data from being persisted

            I am also confused seeing the stacktrace. Its hould not but it is not letting the main data persist in the repository.

             

            • does this happen outside of a cluster, in a single node ? (you seem to be running clustered in EAP, but not using the EAP subsystem for clustering)

            Yes i am running in clustered environment . However I am not using EAP subsystem for clustering.

             

            I tried upgrading modeshape to 3.7.4.Final and infinispan to 5.2.10.Final , However it is still not working.

            And I cant upgrade my EAP .

             

            So is there any other to solve this OR I have to live with LockMode.OPTIMISTIC