4 Replies Latest reply on Apr 12, 2011 12:06 PM by Mircea Markus

    Transaction tm_tspex-app-container_00001300118 is not in a valid state to be invoking cache operations

    Sudheer Krishna Novice

      When i perform a certain operation which updates both databse and cache it seems to perform fine. When i make this a part of transaction it faisl with teh following error.

       

      "java.lang.IllegalStateException:Transaction tm_tspex-app-container_00001300118 is not in a valid state to be invoking cache operations"

       

      The stack trace is as follows

       

                                                              java.lang.IllegalStateException: Transaction tm_mycomp-app-container_00001300118 is not in a valid state to be invoking cache operations on.

        at org.infinispan.interceptors.TxInterceptor.enlist(TxInterceptor.java:193)

        at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:176)

        at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:130)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)

        at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:113)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)

        at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:87)

        at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:58)

        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:58)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:273)

        at org.infinispan.CacheDelegate.put(CacheDelegate.java:444)

        at org.infinispan.CacheSupport.put(CacheSupport.java:28)

        at com.mycomp.cache.infinispan.InfinispanImpl.put(InfinispanImpl.java:45)

        at com.mycomp.dao.cache.position.PositionDAOCacheImpl.save(PositionDAOCacheImpl.java:50)

        at com.mycomp.dao.cache.position.PositionDAOCacheImpl.save(PositionDAOCacheImpl.java:19)

        at com.mycomp.dao.position.PositionDAOImpl.save(PositionDAOImpl.java:48)

        at com.mycomp.dao.position.PositionDAOImpl.save(PositionDAOImpl.java:13)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

        at $Proxy48.save(Unknown Source)

        at com.mycomp.order.engine.posttrade.position.PositionCalculator.updatePosition(PositionCalculator.java:174)

        at com.mycomp.order.engine.posttrade.PostTradeActionsHandler.handlePostTradeActions(PostTradeActionsHandler.java:35)

        at com.mycomp.order.engine.posttrade.PostTradeActionsHandler$$FastClassByCGLIB$$89e39b32.invoke(<generated>)

        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)

        at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

        at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)

        at com.mycomp.order.engine.posttrade.PostTradeActionsHandler$$EnhancerByCGLIB$$95f1a5d7.handlePostTradeActions(<generated>)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69)

        at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:83)

        at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:57)

        at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)

        at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:102)

        at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:114)

        at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:220)

        at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:120)

        at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:73)

        at org.springframework.integration.handler.MethodInvokingMessageHandler.handleMessage(MethodInvokingMessageHandler.java:57)

        at org.springframework.integration.dispatcher.BroadcastingDispatcher.invokeHandler(BroadcastingDispatcher.java:105)

        at org.springframework.integration.dispatcher.BroadcastingDispatcher.access$000(BroadcastingDispatcher.java:41)

        at org.springframework.integration.dispatcher.BroadcastingDispatcher$1.run(BroadcastingDispatcher.java:90)

        at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)