[jboss-user] [JBossCache] - Treecache / JBoss Cache Issue

cwiesing do-not-reply at jboss.com
Tue May 29 01:25:47 EDT 2007


Hello,

I have a problem with the treecache configuration. First of all I?m my application runs under the following versions:

JBoss 4.0.5 GA
JBoss Seam 1.2.1 GA
JBoss Cache 1.4.0 SP1
Hibernate 3.2.0 GA

The treecache.xml is looking like this:


  | 
  | <?xml version="1.0" encoding="UTF-8" ?>
  | <server>
  |   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
  |   
  |   <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
  |     <depends>jboss:service=Naming</depends>
  |     <depends>jboss:service=TransactionManager</depends>
  | 
  |     <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
  | 	<attribute name="NodeLockingScheme">PESSIMISTIC</attribute>		
  |     <attribute name="IsolationLevel">NONE</attribute>
  | 
  |     <attribute name="CacheMode">LOCAL</attribute>
  |     
  |     <attribute name="UseInterceptorMbeans">false</attribute>
  | 
  |     <attribute name="LockAcquisitionTimeout">15000</attribute>
  | 
  |    <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
  | 
  |     <attribute name="EvictionPolicyConfig">
  |       <config>
  |         <attribute name="wakeUpIntervalSeconds">5</attribute>
  |         <region name="/_default_">
  |          <attribute name="maxNodes">10000</attribute>
  |          <attribute name="timeToLiveSeconds">3600</attribute>
  |          <attribute name="maxAgeSeconds">86400</attribute>
  |        </region>
  |        <region name="/net/package/xxx">
  |          <attribute name="maxNodes">5000</attribute>
  |          <attribute name="timeToLiveSeconds">30</attribute>
  |        </region>
  |       </config>
  |     </attribute>
  | 
  | 	<attribute name="CacheLoaderConfiguration">
  | 	    <config>
  | 	        <passivation>false</passivation>
  | 	        <shared>false</shared>
  | 	
  | 	        <cacheloader>
  | 	            <class>org.jboss.cache.loader.FileCacheLoader</class>
  | 	            <properties>
  | 	                location=treecache
  | 	            </properties>
  | 	            <async>false</async>
  | 	            <fetchPersistentState>true</fetchPersistentState>
  | 	            <ignoreModifications>false</ignoreModifications>
  | 
  | 	            <purgeOnStartup>true</purgeOnStartup>
  | 	        </cacheloader>
  | 	    </config>
  | 	</attribute>
  |   </mbean>
  | </server>   
  | 	



I?m using the EntityManager with ExtendedPersistenceContext. So when I try an update of a dataset the following Exception is thrown:

anonymous wrote : 
  | [17:26:07] [Administrator] [INFO ] [...STDOUT                        :152  ] >> Hibernate: update SCHEMA.CONTRACT set description=? where id=?
  | [17:26:07] [Administrator] [WARN ] [...che.interceptors.TxInterceptor:104  ] >> Commit failed.  Clearing stale locks.
  | [17:26:07] [Administrator] [ERROR] [....OrderedSynchronizationHandler:119  ] >> failed calling afterCompletion() on TxInterceptor.LocalSynchronizationHandler(gtx=GlobalTransaction
  | ::5, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=urraco/25, BranchQual=, localId=25])
  | java.lang.RuntimeException: Commit failed.
  | 	at org.jboss.cache.interceptors.TxInterceptor.runCommitPhase(TxInterceptor.java:716)
  | 	at org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.afterCompletion(TxInterc
  | eptor.java:1007)
  | 	at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.afterCompletion(TxInterce
  | ptor.java:1103)
  | 	at org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompletion(OrderedSynchronizatio
  | nHandler.java:83)
  | 	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:377)
  | 	at org.jboss.tm.TxManager.commit(TxManager.java:240)
  | 	at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.ja
  | va:140)
  | 	at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:324
  | )
  | 	at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsAfterPhase(TransactionalSeam
  | PhaseListener.java:45)
  | 	at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:111)
  | 	at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager
  | .java:89)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:345)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at net.tmobile.trp.security.AuthorizationFilter.doFilter(AuthorizationFilter.java:89)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
  | )
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  | 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  | 	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.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11Base
  | Protocol.java:664)
  | 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 	at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.lang.Exception: transaction GlobalTransaction::5 not found in transaction table
  | 	at org.jboss.cache.loader.FileCacheLoader.commit(FileCacheLoader.java:220)
  | 	at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:95)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
  | 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:197)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
  | 	at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
  | 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
  | 	at org.jboss.cache.interceptors.TxInterceptor.handleCommitRollback(TxInterceptor.java:660)
  | 	at org.jboss.cache.interceptors.TxInterceptor.runCommitPhase(TxInterceptor.java:702)
  | 	... 57 more
  | 

I tried to debug the source code and it seams like that the prepare-Method of the JBoss-Cache is never called before the commit-Method (which includes the remove-Statement) was called.

But when I remove the CacheLoaderConfiguration part from my treecache-configuration it seams to be working.

Which reason can caused this Exception?

Thanks in advance

Christian 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049181#4049181

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049181



More information about the jboss-user mailing list