Problems with Optimistic Locking in 1.2.4 FINAL
xavierpayne2 Oct 24, 2005 11:07 AMManik>
Per your request I have downloaded and installed the 1.2.4 final jbosscache.jar into my 4.0.2 jboss deployment.
I still get the same transaction exceptions with 1.2.4 final as I did with the cvs releases.
An important thing to note is that I have 1 remote client making repeated calls to a stateless session bean. The Stateless Session bean is then writing to the cache. If I run that client by itself it can run for 100,000s of iterations just fine.
If have another remote client that makes repeated calls to another stateless session bean that does cache reads.
If I run these clients in parallel (same time but seperate vms) It works with Pessimistic locking but with Optimistic locking I get this exception after between 50 - 100 iterations.
10:54:13,480 INFO [OptimisticValidatorInterceptor] DataNode [/Core/Connections/4b6s1o1j-mbd0of-ef6vdhq2-1-ef6vfv4z-4/SubscriberSequences/4b6s1o1j-mbd0of-ef6vdhq2-1-ef6vfv9r-5/SubStats] version number (52) is greater than or equal to workspace node version 52 10:54:13,480 WARN [OptimisticTxInterceptor] runPreparePhase() failed. Transaction is marked as rolled back org.jboss.cache.CacheException: unable to validate nodes at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.validateNodes(OptimisticValidatorInterceptor.java:115) at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:70) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41) at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:87) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41) at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:76) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41) at org.jboss.cache.interceptors.OptimisticTxInterceptor.handleLocalPrepare(OptimisticTxInterceptor.java:262) at org.jboss.cache.interceptors.OptimisticTxInterceptor.access$000(OptimisticTxInterceptor.java:30) at org.jboss.cache.interceptors.OptimisticTxInterceptor$SynchronizationHandler.beforeCompletion(OptimisticTxInterceptor.java:600) at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:72) at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1384) at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1076) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:296) at org.jboss.tm.TxManager.commit(TxManager.java:200) at org.jboss.cache.interceptors.OptimisticTxInterceptor.handleLocalTx(OptimisticTxInterceptor.java:216) at org.jboss.cache.interceptors.OptimisticTxInterceptor.invoke(OptimisticTxInterceptor.java:109) at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4339) at org.jboss.cache.TreeCache.put(TreeCache.java:3083) at org.jboss.cache.TreeCache.put(TreeCache.java:3024) at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at infrastructure.platform.server.util.services.cache.impl.JBossSerializableCacheServiceHelper.invokeServerMethod(JBossSerializableCacheServiceHelper.java:266) at infrastructure.platform.server.util.services.cache.impl.JBossSerializableCacheServiceHelper.put(JBossSerializableCacheServiceHelper.java:183) at infrastructure.platform.server.util.cache.impl.SerializableJBossCacheMap.put(SerializableJBossCacheMap.java:374) at infrastructure.platform.server.util.cache.CachedMap.put(CachedMap.java:255) at infrastructure.platform.shared.capi.core.plugin.j2ee.jms.impl.SubProliferator.disseminate(SubProliferator.java:223) at infrastructure.platform.server.publication.core.impl.PluggableDisseminator.disseminate(PluggableDisseminator.java:84) at infrastructure.platform.server.publication.core.utils.impl.PSDisseminationWorker.exec(PSDisseminationWorker.java:270) at infrastructure.platform.server.publication.core.utils.impl.PSDisseminationWorker.run(PSDisseminationWorker.java:350) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:595) 10:54:13,527 WARN [OptimisticTxInterceptor] Rolling back exception encountered org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=WILEY/669, BranchQual=, localId=669] status=STATUS_NO_TRANSACTION; - nested throwable: (org.jboss.util.NestedRuntimeException: ; - nested throwable: (org.jboss.cache.CacheException: unable to validate nodes)) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:344) at org.jboss.tm.TxManager.commit(TxManager.java:200) at org.jboss.cache.interceptors.OptimisticTxInterceptor.handleLocalTx(OptimisticTxInterceptor.java:216) at org.jboss.cache.interceptors.OptimisticTxInterceptor.invoke(OptimisticTxInterceptor.java:109) at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4339) at org.jboss.cache.TreeCache.put(TreeCache.java:3083) at org.jboss.cache.TreeCache.put(TreeCache.java:3024) at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at infrastructure.platform.server.util.services.cache.impl.JBossSerializableCacheServiceHelper.invokeServerMethod(JBossSerializableCacheServiceHelper.java:266) at infrastructure.platform.server.util.services.cache.impl.JBossSerializableCacheServiceHelper.put(JBossSerializableCacheServiceHelper.java:183) at infrastructure.platform.server.util.cache.impl.SerializableJBossCacheMap.put(SerializableJBossCacheMap.java:374) at infrastructure.platform.server.util.cache.CachedMap.put(CachedMap.java:255) at infrastructure.platform.shared.capi.core.plugin.j2ee.jms.impl.SubProliferator.disseminate(SubProliferator.java:223) at infrastructure.platform.server.publication.core.impl.PluggableDisseminator.disseminate(PluggableDisseminator.java:84) at infrastructure.platform.server.publication.core.utils.impl.PSDisseminationWorker.exec(PSDisseminationWorker.java:270) at infrastructure.platform.server.publication.core.utils.impl.PSDisseminationWorker.run(PSDisseminationWorker.java:350) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:595) Caused by: org.jboss.util.NestedRuntimeException: ; - nested throwable: (org.jboss.cache.CacheException: unable to validate nodes) at org.jboss.cache.interceptors.OptimisticTxInterceptor$SynchronizationHandler.beforeCompletion(OptimisticTxInterceptor.java:631) at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:72) at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1384) at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1076) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:296) ... 24 more Caused by: org.jboss.cache.CacheException: unable to validate nodes at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.validateNodes(OptimisticValidatorInterceptor.java:115) at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:70) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41) at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:87) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41) at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:76) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41) at org.jboss.cache.interceptors.OptimisticTxInterceptor.handleLocalPrepare(OptimisticTxInterceptor.java:262) at org.jboss.cache.interceptors.OptimisticTxInterceptor.access$000(OptimisticTxInterceptor.java:30) at org.jboss.cache.interceptors.OptimisticTxInterceptor$SynchronizationHandler.beforeCompletion(OptimisticTxInterceptor.java:600) ... 28 more 10:54:13,527 WARN [OptimisticTxInterceptor] Roll back failed encountered java.lang.IllegalStateException: No transaction. at org.jboss.tm.TxManager.rollback(TxManager.java:331) at org.jboss.cache.interceptors.OptimisticTxInterceptor.handleLocalTx(OptimisticTxInterceptor.java:224) at org.jboss.cache.interceptors.OptimisticTxInterceptor.invoke(OptimisticTxInterceptor.java:109) at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4339) at org.jboss.cache.TreeCache.put(TreeCache.java:3083) at org.jboss.cache.TreeCache.put(TreeCache.java:3024) at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at infrastructure.platform.server.util.services.cache.impl.JBossSerializableCacheServiceHelper.invokeServerMethod(JBossSerializableCacheServiceHelper.java:266) at infrastructure.platform.server.util.services.cache.impl.JBossSerializableCacheServiceHelper.put(JBossSerializableCacheServiceHelper.java:183) at infrastructure.platform.server.util.cache.impl.SerializableJBossCacheMap.put(SerializableJBossCacheMap.java:374) at infrastructure.platform.server.util.cache.CachedMap.put(CachedMap.java:255) at infrastructure.platform.shared.capi.core.plugin.j2ee.jms.impl.SubProliferator.disseminate(SubProliferator.java:223) at infrastructure.platform.server.publication.core.impl.PluggableDisseminator.disseminate(PluggableDisseminator.java:84) at infrastructure.platform.server.publication.core.utils.impl.PSDisseminationWorker.exec(PSDisseminationWorker.java:270) at infrastructure.platform.server.publication.core.utils.impl.PSDisseminationWorker.run(PSDisseminationWorker.java:350) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:595)