10 Replies Latest reply on Jan 29, 2007 6:21 PM by Manik Surtani

    IdentityLock write lock

    Jerry Shao Newbie

      Hi

      I am using the latest build of JBoss Cache 1.2.1. But I still get the Error when using with Hibernate.
      ERROR [org.jboss.cache.lock.IdentityLock] write lock for //net/sf/hibernate/cache/UpdateTimestampsCache/Customer could not be acquired after 15000 ms. Lock map ownership Read lock owners: []
      Write lock owner: <odms-dev-svr1:3939>:2030
      (caller=Thread[TP-Processor1,5,jboss])
      2005-03-10 11:23:51,035 ERROR [net.sf.hibernate.impl.SessionImpl] could not release a cache lock
      net.sf.hibernate.cache.CacheException: org.jboss.cache.lock.TimeoutException: write lock for //net/sf/hibernate/cache/UpdateTimestampsCache/Customer could not be acquired after 15000 ms. Lock map ownership Read lock owners: []
      Write lock owner: <odms-dev-svr1:3939>:2030
      (caller=Thread[TP-Processor1,5,jboss])

      The configuration is:
      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- TreeCache Service Configuration -->
      <!-- -->
      <!-- ===================================================================== -->






      <!-- ==================================================================== -->
      <!-- Defines TreeCache configuration -->
      <!-- ==================================================================== -->



      jboss:service=Naming
      jboss:service=TransactionManager

      <!--
      Configure the TransactionManager
      -->
      org.jboss.cache.DummyTransactionManagerLookup

      <!--
      Node isolation level : SERIALIZABLE
      REPEATABLE_READ (default)
      READ_COMMITTED
      READ_UNCOMMITTED
      NONE
      -->
      REPEATABLE_READ

      <!--
      Valid modes are LOCAL
      REPL_ASYNC
      REPL_SYNC
      -->
      REPL_ASYNC

      <!-- Name of cluster. Needs to be the same for all clusters, in order
      to find each other
      -->
      TreeCache-Cluster

      <!-- JGroups protocol stack properties. Can also be a URL,
      e.g. file:/home/bela/default.xml

      -->



      <!-- UDP: if you have a multihomed machine,
      set the bind_addr attribute to the appropriate NIC IP address -->
      <!-- UDP: On Windows machines, because of the media sense feature
      being broken with multicast (even after disabling media sense)
      set the loopback attribute to true -->
      <UDP mcast_addr="228.1.2.3" mcast_port="45567"
      ip_ttl="64" ip_mcast="true"
      mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
      ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
      loopback="true"/>
      <PING timeout="2000" num_initial_members="3"
      up_thread="false" down_thread="false"/>
      <MERGE2 min_interval="10000" max_interval="20000"/>
      <FD shun="true" up_thread="true" down_thread="true"/>
      <VERIFY_SUSPECT timeout="1500"
      up_thread="false" down_thread="false"/>
      <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
      up_thread="false" down_thread="false"/>
      <pbcast.STABLE desired_avg_gossip="20000"
      up_thread="false" down_thread="false"/>
      <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
      down_thread="false"/>
      <FRAG frag_size="8192"
      down_thread="false" up_thread="false"/>
      <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
      shun="true" print_local_addr="true"/>
      <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>



      <!--
      Max number of entries in the cache. If this is exceeded, the
      eviction policy will kick some entries out in order to make
      more room
      -->
      100000

      <!--
      The max amount of time (in milliseconds) we wait until the
      initial state (ie. the contents of the cache) are retrieved from
      existing members in a clustered environment
      -->
      20000

      <!--
      Number of milliseconds to wait until all responses for a
      synchronous call have been received.
      -->
      10000

      <!-- Max number of milliseconds to wait for a lock acquisition -->
      15000

      <!-- Max number of milliseconds we hold a lock (not currently
      implemented) -->
      60000

      <!-- Name of the eviction policy class. Not supported now. -->






      I change the LockAcquisitionTimeout to 1000 and it gives the application more quick response. It should not be the good solution for it. Does anyone could give some help for it?

      Thanks!

        • 1. Re: IdentityLock write lock
          Daniel Rosenbaum Newbie

          I might add I am experiencing the same error. I spent quite a bit of time trying to solve this and I am glad I am not the only one experiencing this.

          I am using Hibernate 2.1.8 with JBossCache 1.2.1 and Weblogic 8.1. In my case, I have two applications on the same server.

          App 1 starts the transaction using the Hibernate API setup with a JTA factory, does some queries and then forwards a request to a servlet in app 2. Servlet 2 then starts its own transaction using the Hibernate API (which in reality would join the JTA transaction started in app1) and does some updates and inserts, then commits (which wont really commit yet since App 1 still has the JTA transaction still open). After this control goes back to App1 and it finally commits. At this point, I get an exception similar to the first poster's in App2 (even though I committed in App1, it causes the commit to propogate back to App2). It is also on the UpdateTimestampsCache.

          I am also using an Oracle XA datasource.

          (It is almost as if the JBossCache on App2 loses track that it owns the lock on UpdateTimestampsCache in the very same thread, and tries to aquire it again even though it already owns it.)

          I hope this helps, and would also appreciate any help.

          Thank you,
          Daniel

          • 2. Re: IdentityLock write lock
            Bela Ban Master

            The way the Hibernate TreeCacheProvider uses the TreeCache is broken (or, in other words, not optimal), and has been changed. The new code will be available as part of Hibernate 3 final. The integration code will be beta though, and will be final in one of the subsequent Hibernate versions.
            The main reason is the mismatch between H's assumption of optimistic locking and JBossCache's pessimistic locking.
            The new Hibernate TreeCacheProvider will minimize the locking exceptions, but not completely remove them: only the JBossCache version implementing optimistic locking will get rid of them completely, this is planned for JBossCache 1.3 or 1.4.

            • 3. Re: IdentityLock write lock
              Daniel Rosenbaum Newbie

              Thanks Bela for the reply. Will there be a patch or something available for Hibernate 2.1.8? I am going to have an app going to production in the next month or 2 and would like to be able to use the Hibernate query cache with TreeCache if possible.

              Thanks,
              Daniel

              • 4. Re: IdentityLock write lock
                Bela Ban Master

                I don't know whether the TreeCacheProvider will be backported (that's up to the H folks), but I'd assume it should be easy to get the Hibernate 3.0 class and simply compile it under 2.1.8

                • 5. Re: IdentityLock write lock
                  Daniel Rosenbaum Newbie

                  I tired to grab the TreeCache and TreeCacheProvider classes from Hibernate3 and using them with 2.1.8 but this produced the following exception when I try to commit the JTA transaction:

                  java.lang.ArrayIndexOutOfBoundsException: 1
                   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
                   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
                   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2438)
                   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
                   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
                   at net.sf.hibernate.transaction.JTATransaction.commit(JTATransaction.java:52)
                  


                  Apparently there is more to this change than just these classes. Any ideas?

                  • 6. Re: IdentityLock write lock
                    Jerry Shao Newbie

                    When is the 1.3 or 1.4 JBossCache to be released?

                    • 7. Re: IdentityLock write lock
                      Bela Ban Master

                      we try to release every 2-3 months, but the next release is going to be 1.2.2 (hopefully end of April).

                      • 8. Re: IdentityLock write lock
                        Andrew Coulson Newbie

                        Did you ever resolve this problem? I am having the same problem and would be very interested in any solution.

                        • 9. Re: IdentityLock write lock
                          - - Newbie

                          i still get thousands of these identity lock errors with the latest jars.
                          i also get "Must be in a valid transaction _remove" error.

                          - hibernate 3.2.2.GA hibernate3.jar
                          - JBossCache 1.4.1.GA jboss-cache.jar
                          - JBosss 4.0.5.GA
                          - org.hibernate.cache.OptimisticTreeCacheProvider

                          do i need to replace any other jars other than those 2 in the lib dir?





                          2007-01-29 13:55:25,710 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/PlayerGame could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5487
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5499, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5487 (org.jboss.cache.lock.LockStrategyReadCommitted@4d79d425))
                          2007-01-29 13:55:25,754 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/Code could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5477
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5500, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5477 (org.jboss.cache.lock.LockStrategyReadCommitted@68860b1d))
                          2007-01-29 13:55:25,755 INFO [PlayerSB] login user u89
                          2007-01-29 13:55:26,598 ERROR [IdentityLock] write lock for / could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5384
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5505, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5384 (org.jboss.cache.lock.LockStrategyReadCommitted@155ec9f4))
                          2007-01-29 13:55:27,174 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/PlayerGame could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5487
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5512, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5487 (org.jboss.cache.lock.LockStrategyReadCommitted@4d79d425))
                          2007-01-29 13:55:27,818 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/Code could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5477
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5514, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5477 (org.jboss.cache.lock.LockStrategyReadCommitted@68860b1d))
                          2007-01-29 13:55:27,819 INFO [PlayerSB] login user u168
                          2007-01-29 13:55:29,062 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/Code could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5477
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5524, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5477 (org.jboss.cache.lock.LockStrategyReadCommitted@68860b1d))
                          2007-01-29 13:55:29,062 INFO [PlayerSB] login user u18
                          2007-01-29 13:55:29,130 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/PlayerGame could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5487
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5525, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5487 (org.jboss.cache.lock.LockStrategyReadCommitted@4d79d425))
                          2007-01-29 13:55:29,454 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/User could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:4787
                          (caller=GlobalTransaction:<122.100.2.40:33307>:4789, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:4787 (org.jboss.cache.lock.LockStrategyReadCommitted@73cc86ee))
                          2007-01-29 13:55:29,459 ERROR [ActionQueue] could not release a cache lock
                          org.hibernate.cache.CacheException: org.jboss.cache.CacheException: Must be in a valid transaction _remove; id:5(null, zzz/zzzint/domain/model/Offer, true)
                          at org.hibernate.cache.OptimisticTreeCache.clear(OptimisticTreeCache.java:169)
                          at org.hibernate.cache.TransactionalCache.clear(TransactionalCache.java:124)
                          at org.hibernate.impl.SessionFactoryImpl.evictEntity(SessionFactoryImpl.java:832)
                          at org.hibernate.action.BulkOperationCleanupAction.evictEntityRegions(BulkOperationCleanupAction.java:132)
                          at org.hibernate.action.BulkOperationCleanupAction.afterTransactionCompletion(BulkOperationCleanupAction.java:111)
                          at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:170)
                          at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:424)
                          at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225)
                          at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
                          at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1526)
                          at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1198)
                          at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:369)
                          at org.jboss.tm.TxManager.commit(TxManager.java:240)
                          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)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
                          at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
                          at $Proxy92.login(Unknown Source)
                          at sun.reflect.GeneratedMethodAccessor340.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at zzz.zzzint.service.ProxyHandler.invokeMethod(Unknown Source)
                          at zzz.zzzint.service.ProxyHandler.invoke(Unknown Source)
                          at $Proxy103.login(Unknown Source)
                          at zzz.zzzint.ui.struts.action.LoginPlayerAction.doExecute(Unknown Source)
                          at zzz.zzzint.ui.struts.action.BaseAction.execute(Unknown Source)
                          at zzz.zzzint.ui.struts.action.PlayerAction.execute(Unknown Source)
                          at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
                          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
                          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
                          at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at zzz.zzzint.ui.helper.ConfigRequestFilter.doFilter(Unknown Source)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                          at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
                          at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
                          at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
                          at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
                          at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
                          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                          at java.lang.Thread.run(Thread.java:595)
                          Caused by: org.jboss.cache.CacheException: Must be in a valid transaction _remove; id:5(null, zzz/zzzint/domain/model/Offer, true)
                          at org.jboss.cache.interceptors.OptimisticNodeInterceptor.invoke(OptimisticNodeInterceptor.java:66)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.EvictionInterceptor.invoke(EvictionInterceptor.java:84)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor.invoke(OptimisticCreateIfNotExistsInterceptor.java:69)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:84)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:126)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:147)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:364)
                          at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:160)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
                          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5710)
                          at org.jboss.cache.TreeCache.remove(TreeCache.java:3804)
                          at org.jboss.cache.TreeCache.remove(TreeCache.java:3384)
                          at org.hibernate.cache.OptimisticTreeCache.clear(OptimisticTreeCache.java:166)
                          ... 70 more
                          2007-01-29 13:55:29,461 INFO [ProxyHandler] leaked concurrency exception - JBossCache optimistic version
                          2007-01-29 13:55:29,466 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/PlayerGame could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5487
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5527, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5487 (org.jboss.cache.lock.LockStrategyReadCommitted@4d79d425))
                          2007-01-29 13:55:29,470 ERROR [IdentityLock] write lock for / could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5487
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5528, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5487 (org.jboss.cache.lock.LockStrategyReadCommitted@155ec9f4))
                          2007-01-29 13:55:29,498 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/User could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:4787
                          (caller=GlobalTransaction:<122.100.2.40:33307>:4792, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:4787 (org.jboss.cache.lock.LockStrategyReadCommitted@73cc86ee))
                          2007-01-29 13:55:29,501 ERROR [ActionQueue] could not release a cache lock
                          org.hibernate.cache.CacheException: org.jboss.cache.CacheException: Must be in a valid transaction _remove; id:5(null, zzz/zzzint/domain/model/Offer, true)
                          at org.hibernate.cache.OptimisticTreeCache.clear(OptimisticTreeCache.java:169)
                          at org.hibernate.cache.TransactionalCache.clear(TransactionalCache.java:124)
                          at org.hibernate.impl.SessionFactoryImpl.evictEntity(SessionFactoryImpl.java:832)
                          at org.hibernate.action.BulkOperationCleanupAction.evictEntityRegions(BulkOperationCleanupAction.java:132)
                          at org.hibernate.action.BulkOperationCleanupAction.afterTransactionCompletion(BulkOperationCleanupAction.java:111)
                          at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:170)
                          at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:424)
                          at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225)
                          at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
                          at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1526)
                          at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1198)
                          at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:369)
                          at org.jboss.tm.TxManager.commit(TxManager.java:240)
                          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)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
                          at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
                          at $Proxy92.login(Unknown Source)
                          at sun.reflect.GeneratedMethodAccessor340.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at zzz.zzzint.service.ProxyHandler.invokeMethod(Unknown Source)
                          at zzz.zzzint.service.ProxyHandler.invoke(Unknown Source)
                          at $Proxy103.login(Unknown Source)
                          at zzz.zzzint.ui.struts.action.LoginPlayerAction.doExecute(Unknown Source)
                          at zzz.zzzint.ui.struts.action.BaseAction.execute(Unknown Source)
                          at zzz.zzzint.ui.struts.action.PlayerAction.execute(Unknown Source)
                          at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
                          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
                          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
                          at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at zzz.zzzint.ui.helper.ConfigRequestFilter.doFilter(Unknown Source)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                          at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
                          at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
                          at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
                          at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
                          at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
                          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                          at java.lang.Thread.run(Thread.java:595)
                          Caused by: org.jboss.cache.CacheException: Must be in a valid transaction _remove; id:5(null, zzz/zzzint/domain/model/Offer, true)
                          at org.jboss.cache.interceptors.OptimisticNodeInterceptor.invoke(OptimisticNodeInterceptor.java:66)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.EvictionInterceptor.invoke(EvictionInterceptor.java:84)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor.invoke(OptimisticCreateIfNotExistsInterceptor.java:69)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:84)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:126)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:147)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:364)
                          at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:160)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
                          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5710)
                          at org.jboss.cache.TreeCache.remove(TreeCache.java:3804)
                          at org.jboss.cache.TreeCache.remove(TreeCache.java:3384)
                          at org.hibernate.cache.OptimisticTreeCache.clear(OptimisticTreeCache.java:166)
                          ... 70 more
                          2007-01-29 13:55:29,504 INFO [ProxyHandler] leaked concurrency exception - JBossCache optimistic version
                          2007-01-29 13:55:29,867 INFO [PlayerSB] start login.
                          2007-01-29 13:55:29,911 INFO [PlayerSB] start login.
                          2007-01-29 13:55:29,938 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/Code could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:5477
                          (caller=GlobalTransaction:<122.100.2.40:33307>:5535, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:5477 (org.jboss.cache.lock.LockStrategyReadCommitted@68860b1d))
                          2007-01-29 13:55:29,939 INFO [PlayerSB] login user u32
                          2007-01-29 13:55:30,398 ERROR [IdentityLock] write lock for zzz/zzzint/domain/model/User could not be acquired after 15000 ms. Locks: Read lock owners: []
                          Write lock owner: GlobalTransaction:<122.100.2.40:33307>:4787
                          (caller=GlobalTransaction:<122.100.2.40:33307>:4800, lock info: write owner=GlobalTransaction:<122.100.2.40:33307>:4787 (org.jboss.cache.lock.LockStrategyReadCommitted@73cc86ee))
                          2007-01-29 13:55:30,413 ERROR [ActionQueue] could not release a cache lock
                          org.hibernate.cache.CacheException: org.jboss.cache.CacheException: Must be in a valid transaction _remove; id:5(null, zzz/zzzint/domain/model/Offer, true)
                          at org.hibernate.cache.OptimisticTreeCache.clear(OptimisticTreeCache.java:169)
                          at org.hibernate.cache.TransactionalCache.clear(TransactionalCache.java:124)
                          at org.hibernate.impl.SessionFactoryImpl.evictEntity(SessionFactoryImpl.java:832)
                          at org.hibernate.action.BulkOperationCleanupAction.evictEntityRegions(BulkOperationCleanupAction.java:132)
                          at org.hibernate.action.BulkOperationCleanupAction.afterTransactionCompletion(BulkOperationCleanupAction.java:111)
                          at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:170)
                          at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:424)
                          at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225)
                          at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
                          at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1526)
                          at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1198)
                          at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:369)
                          at org.jboss.tm.TxManager.commit(TxManager.java:240)
                          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)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                          at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
                          at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
                          at $Proxy92.login(Unknown Source)
                          at sun.reflect.GeneratedMethodAccessor340.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at zzz.zzzint.service.ProxyHandler.invokeMethod(Unknown Source)
                          at zzz.zzzint.service.ProxyHandler.invoke(Unknown Source)
                          at $Proxy103.login(Unknown Source)
                          at zzz.zzzint.ui.struts.action.LoginPlayerAction.doExecute(Unknown Source)
                          at zzz.zzzint.ui.struts.action.BaseAction.execute(Unknown Source)
                          at zzz.zzzint.ui.struts.action.PlayerAction.execute(Unknown Source)
                          at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
                          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
                          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
                          at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at zzz.zzzint.ui.helper.ConfigRequestFilter.doFilter(Unknown Source)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                          at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
                          at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
                          at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
                          at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
                          at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
                          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                          at java.lang.Thread.run(Thread.java:595)
                          Caused by: org.jboss.cache.CacheException: Must be in a valid transaction _remove; id:5(null, zzz/zzzint/domain/model/Offer, true)
                          at org.jboss.cache.interceptors.OptimisticNodeInterceptor.invoke(OptimisticNodeInterceptor.java:66)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.EvictionInterceptor.invoke(EvictionInterceptor.java:84)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor.invoke(OptimisticCreateIfNotExistsInterceptor.java:69)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:84)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:126)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:147)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:364)
                          at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:160)
                          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
                          at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
                          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5710)
                          at org.jboss.cache.TreeCache.remove(TreeCache.java:3804)
                          at org.jboss.cache.TreeCache.remove(TreeCache.java:3384)
                          at org.hibernate.cache.OptimisticTreeCache.clear(OptimisticTreeCache.java:166)
                          ... 70 more

                          • 10. Re: IdentityLock write lock
                            Manik Surtani Master

                            This could have to do with somewhat stronger locking semantics for creating/removing child nodes, introduced in 1.4.1.GA.

                            See http://jira.jboss.com/jira/browse/JBCACHE-955

                            I hope to put out an SP1 very shortly.