-
15. Re: Transaction Rollback Problem
j_ri Apr 11, 2006 9:43 AM (in response to jedlloyd)Hello,
I just upgraded my JBoss 4.0.3 SP1 to use JBossCache 1.3.0, but unfortunately I get a lot of exceptions now.
Can you confirm that I face the same bug mentioned above? I only get the exception, if there is more than one JBoss running in my Cluster. A single JBosswith the same configuration is working.
15:26:04,046 ERROR [TxInterceptor] Transaction has a null transaction entry - beforeCompletion() will fail.
15:26:04,046 WARN [TxInterceptor] Rollback had a problem
java.lang.IllegalStateException: found no local TX for global TX GlobalTransaction:<rk3338:1763>:1
at org.jboss.cache.interceptors.TxInterceptor.getLocalTxForGlobalTx(TxInterceptor.java:587)
at org.jboss.cache.interceptors.TxInterceptor.runRollbackPhase(TxInterceptor.java:692)
at org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.afterCompletion(TxInterceptor.java:958)
at org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompletion(OrderedSynchronizationHandler.java:80)
at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1508)
at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1180)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:351)
at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:447)
at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:280)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:110)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:181)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4804)
at org.jboss.cache.TreeCache._replicate(TreeCache.java:4366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:220)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:554)
at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:691)
at java.lang.Thread.run(Thread.java:595)
15:26:04,078 ERROR [TxInterceptor] Commit/rollback failed.
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=rk3031/99, BranchQual=, localId=99] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.IllegalStateException: cannot find transaction entry for GlobalTransaction:<rk3338:1763>:1)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:354)
at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:447)
at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:280)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:110)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:181)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4804)
at org.jboss.cache.TreeCache._replicate(TreeCache.java:4366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:220)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
.......
.......
My Configuration (for Tomcat Clustering (tc5-cluster-service.xml) ) looks like:<server> <!-- ==================================================================== --> <!-- Defines TreeCache configuration --> <!-- ==================================================================== --> <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TomcatClusteringCache"> <depends>jboss:service=Naming</depends> <depends>jboss:service=TransactionManager</depends> <!-- Configure the TransactionManager --> <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute> <!-- Isolation level : SERIALIZABLE REPEATABLE_READ (default) READ_COMMITTED READ_UNCOMMITTED NONE --> <attribute name="IsolationLevel">REPEATABLE_READ</attribute> <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC --> <attribute name="CacheMode">REPL_ASYNC</attribute> <!-- Name of cluster. Needs to be the same for all clusters, in order to find each other --> <attribute name="ClusterName">Tomcat-Cluster</attribute> <!-- JGroups protocol stack properties. Can also be a URL, e.g. file:/home/bela/default.xml <attribute name="ClusterProperties"></attribute> --> <attribute name="ClusterConfig"> <!-- The default UDP stack: - If you have a multihomed machine, set the UDP protocol's bind_addr attribute to the appropriate NIC IP address, e.g bind_addr="192.168.0.2". - On Windows machines, because of the media sense feature being broken with multicast (even after disabling media sense) set the UDP protocol's loopback attribute to true --> <config> <UDP mcast_addr="224.100.101.1" mcast_port="${UDP.cluster.mcast_port}" ip_ttl="1" ip_mcast="true" mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000" ucast_recv_buf_size="80000" loopback="false"/> <PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false"/> <MERGE2 min_interval="10000" max_interval="20000"/> <FD_SOCK/> <VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false"/> <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" max_xmit_size="8192" up_thread="false" down_thread="false"/> <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false"/> <pbcast.STABLE desired_avg_gossip="20000" up_thread="false" 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="true" down_thread="true"/> </config> <!-- Alternate TCP stack: customize it for your environment, change bind_addr and initial_hosts --> <!-- <config> <TCP bind_addr="thishost" start_port="7810" loopback="true"/> <TCPPING initial_hosts="thishost[7810],otherhost[7810]" port_range="3" timeout="3500" num_initial_members="3" up_thread="true" down_thread="true"/> <MERGE2 min_interval="5000" max_interval="10000"/> <FD shun="true" timeout="2500" max_tries="5" up_thread="true" down_thread="true" /> <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false" /> <pbcast.NAKACK down_thread="true" up_thread="true" gc_lag="100" retransmit_timeout="3000"/> <pbcast.STABLE desired_avg_gossip="20000" down_thread="false" up_thread="false" /> <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="false" print_local_addr="true" down_thread="true" up_thread="true"/> <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/> </config> --> </attribute> <!-- Max number of milliseconds to wait for a lock acquisition --> <attribute name="LockAcquisitionTimeout">15000</attribute> </mbean> </server>
I also tried to configure Hibernate to use the TreeCache, but I get similar Error Messages.
Using the old "jboss-cache.jar" everything works fine, but for Hibernate I'd like to use the the new feature "INVALIDATION_ASYNC" as soon as possible.
Please tell me if I missed to change my configuration to fit JBossCache 1.3.0 or if it's the bug mentioned above.
best regards
jochen -
16. Re: Transaction Rollback Problem
mbh Apr 23, 2006 4:05 AM (in response to jedlloyd)I have the exact same problem as jochen when I try to upgrade JBoss AS 4.02 to use JBossCache 1.3. Can somebody confirm that the Tomcat SSO cluster works with version 1.3?
-
17. Re: Transaction Rollback Problem
brian.stansberry Apr 24, 2006 12:22 AM (in response to jedlloyd)I recommend you try 1.3.0.SP1; the execution path shown in your stack trace has been changed.
-
18. Re: Transaction Rollback Problem
mcevikce May 9, 2006 5:30 PM (in response to jedlloyd)I running JbossCache 1.3.0SP1 with JBoss 4.0.3SP1 and get the same exceptions.
Boss_4_0_3_SP1 date=200510231054)] Started in 1m:7s:735ms
[09-05-2006 17:17:58.625] [163263] [org.jboss.cache.interceptors.TxInterceptor] [ERROR] [Thread-42] Transaction has a null transac
tion entry - beforeCompletion() will fail.
[09-05-2006 17:17:58.626] [163264] [org.jboss.cache.interceptors.PessimisticLockInterceptor] [ERROR] [Thread-42] entry for transac
tion GlobalTransaction:<172.16.52.31:45515>:1933 not found (transaction has possibly already been rolled back)
[09-05-2006 17:17:58.628] [163266] [org.jboss.cache.interceptors.TxInterceptor] [ERROR] [Thread-42] Commit/rollback failed.
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=nycpasv002/14, BranchQual
=, localId=14] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.IllegalStateException: cannot find transaction entry f
or GlobalTransaction:<172.16.52.31:45515>:1933)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:354)
at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:447)
at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:280)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:110)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:181)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4804)
at org.jboss.cache.TreeCache._replicate(TreeCache.java:4366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:286)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:236)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:618)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:515)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:734)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:566)
at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:703)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: cannot find transaction entry for GlobalTransaction:<172.16.52.31:45515>:1933
at org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.beforeCompletion(TxInterceptor.java:921)
at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:72)
at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1473)
at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1092)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:306)
... 20 more
[09-05-2006 17:17:58.639] [163277] [org.jboss.cache.interceptors.TxInterceptor] [INFO ] [Thread-42] Attempting anotehr rollback
[09-05-2006 17:17:58.640] [163278] [org.jboss.cache.interceptors.TxInterceptor] [ERROR] [Thread-42] Unable to rollback
java.lang.IllegalStateException: Transaction has terminated TransactionImpl:XidImpl[FormatId=257, GlobalId=nycpasv002/14, BranchQu
al=, localId=14]
at org.jboss.tm.TransactionImpl.lock(TransactionImpl.java:816)
at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:377)
at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:459)
at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:280)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:110)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:181)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4804)
at org.jboss.cache.TreeCache._replicate(TreeCache.java:4366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:286)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:236)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:618)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:515)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:734)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:566)
at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:703)
at java.lang.Thread.run(Thread.java:595)
[09-05-2006 17:18:07.294] [171932] [org.jboss.cache.interceptors.TxInterceptor] [ERROR] [Thread-42] Transaction has a null transac
tion entry - beforeCompletion() will fail.
[09-05-2006 17:18:07.295] [171933] [org.jboss.cache.interceptors.PessimisticLockInterceptor] [ERROR] [Thread-42] entry for transac
tion GlobalTransaction:<172.16.52.31:45515>:1934 not found (transaction has possibly already been rolled back)
[09-05-2006 17:18:07.296] [171934] [org.jboss.cache.interceptors.TxInterceptor] [ERROR] [Thread-42] Commit/rollback failed.
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=nycpasv002/16, BranchQual
=, localId=16] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.IllegalStateException: cannot find transaction entry f
or GlobalTransaction:<172.16.52.31:45515>:1934)