3 Replies Latest reply on Feb 2, 2007 10:16 AM by Matt Accola

    Failed to get global transaction on get

    Matt Accola Newbie

      I am using TreeCache 1.3.0.SP2 with Hibernate 3.2GA. I am using optimistic strategy. I am using REPL_ASYNC in a 2 node cluster.

      I am getting an exception on a "get" request from the cache in OptimisticReplicationInterceptor. I don't understand why it is looking for a global transaction, and even if it does need one why it cannot find one. You will notice in the stack trace that my Spring TransactionTemplate is in the call trace. In this particular use case the TransactionTemplate will open a read-only JTA transaction. Am I doing somthing wrong?

      Caused by: org.jboss.cache.CacheException: failed to get global transaction
       at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:61)
       at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
       at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:328)
       at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:139)
       at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
       at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:133)
       at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4804)
       at org.jboss.cache.TreeCache.get(TreeCache.java:3040)
       at org.jboss.cache.TreeCache.get(TreeCache.java:3021)
       at org.hibernate.cache.OptimisticTreeCache.read(OptimisticTreeCache.java:108)
       at org.hibernate.cache.TransactionalCache.get(TransactionalCache.java:31)
       at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:472)
       at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:356)
       at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:137)
       at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:101)
       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
       at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
       at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
       at org.hibernate.type.EntityType.resolve(EntityType.java:303)
       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
       at org.hibernate.loader.Loader.doQuery(Loader.java:717)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
       at org.hibernate.loader.Loader.doList(Loader.java:2144)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
       at org.hibernate.loader.Loader.list(Loader.java:2023)
       at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:888)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at fleetcycle.domain.framework.persistence.hibernate.HQLSearchCriteriaExecutor.search(HQLSearchCriteriaExecutor.java:169)
       at fleetcycle.services.framework.persistence.FleetcycleHibernateDaoSupport$12.doInHibernate(FleetcycleHibernateDaoSupport.java:686)
       at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
       at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:338)
       at fleetcycle.services.framework.persistence.FleetcycleHibernateDaoSupport.internalSearch(FleetcycleHibernateDaoSupport.java:672)
       at fleetcycle.dbof.es.taskCardExecution.TaskCardExecutionDAO_Impl.search(TaskCardExecutionDAO_Impl.java:70)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
       at java.lang.reflect.Method.invoke(Method.java:391)
       at fleetcycle.services.framework.persistence.SearchDomainObject.executeDynamicQuery(SearchDomainObject.java:172)
       at fleetcycle.services.framework.persistence.SearchDomainObject.execute(SearchDomainObject.java:106)
       at fleetcycle.services.framework.persistence.SearchDomainObjectCached.execute(SearchDomainObjectCached.java:102)
       at fleetcycle.services.framework.persistence.SearchDomainObjectCached.execute(SearchDomainObjectCached.java:73)
       at fleetcycle.services.framework.execution.ServiceBeanTask.doTask(ServiceBeanTask.java:36)
       at fleetcycle.services.framework.execution.ServiceBeanDefinition.executeServiceDefinition(ServiceBeanDefinition.java:112)
       at fleetcycle.services.framework.execution.ExecutionEntryTask.executeEntryImpl(ExecutionEntryTask.java:134)
       at fleetcycle.services.framework.execution.ExecutionEntryTask.access$000(ExecutionEntryTask.java:34)
       at fleetcycle.services.framework.execution.ExecutionEntryTask$1.doInTransactionWithoutResult(ExecutionEntryTask.java:86)
       at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114)
       at fleetcycle.services.framework.execution.ExecutionEntryTask.doTask(ExecutionEntryTask.java:81)
       at fleetcycle.services.framework.execution.ExecutionEntry.executeWorkflow(ExecutionEntry.java:88)
       at fleetcycle.services.framework.execution.ServiceExecutor.execute(ServiceExecutor.java:94)
       at fleetcycle.ui.framework.actions.AbstractFleetCycleAction.callExecutionEntry(AbstractFleetCycleAction.java:196)
       at fleetcycle.ui.framework.actions.XMLStreamAction.execute(XMLStreamAction.java:81)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
       at fleetcycle.ui.framework.actions.FleetCycleRequestProcessor.process(FleetCycleRequestProcessor.java:102)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
       at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
       at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at fleetcycle.ui.framework.security.AbstractAuthenticationFilter.doFilterInternal(AbstractAuthenticationFilter.java:114)
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
       at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
       at fleetcycle.ui.framework.actions.SessionFilter.doFilterInternal(SessionFilter.java:77)
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
       at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
       at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
       at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670)
       at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1878)
       at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
       at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
       at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
       at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)