I'm getting a rather strange exception and am not sure where to look to resolve it so I would appreciate any leads.
When I try calling a Hibernate DAO to 'create' an object in the database I'm getting an IllegalStateExcception with the text "Wrong transaction association: expected TransactionImpl:XidImpl [FormatId=257, GlobalId=my-url//3963, BranchQual=] was TransactionImpl:XidImpl [FormatId=257, GlobalId=my-url//3967, BranchQual=]"
Here's the stack trace if that's useful:
[junit] Create Messages:
[junit] () DEBUG - No session found in the application context. No session ID will be passed for the front controller invocation.
[junit] () DEBUG - Trying to create reference to an EJB
[junit] () DEBUG - Obtained reference to remote EJB [ejb/FrontController:Stateless]
[junit] () DEBUG - Method of remote EJB [ejb/FrontController] threw exception
[junit] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[junit] java.rmi.ServerException: RuntimeException; nested exception is:
[junit] java.lang.IllegalStateException: Wrong transaction association: expected TransactionImpl:XidImpl [FormatId=257, GlobalId=bcrawford-linux.transdyn.com//4327, BranchQual=] was TransactionImpl:XidImpl [FormatId=257, GlobalId=bcrawford-linux.transdyn.com//4331, BranchQual=]
[junit] at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:292)
[junit] at sun.rmi.transport.Transport$1.run(Transport.java:1 48)
[junit] at java.security.AccessController.doPrivileged(Native Method)
[junit] at sun.rmi.transport.Transport.serviceCall(Transport. java:144)
[junit] at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
[junit] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
[junit] at java.lang.Thread.run(Thread.java:534)
[junit] at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:247)
[junit] at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:223)
[junit] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:1 33)
[junit] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub. invoke(Unknown Source)
[junit] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerPr oxy.invoke(JRMPInvokerProxy.java:135)
[junit] at org.jboss.invocation.InvokerInterceptor.invoke(Inv okerInterceptor.java:96)
[junit] at org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:46)
[junit] at org.jboss.proxy.SecurityInterceptor.invoke(Securit yInterceptor.java:45)
[junit] at org.jboss.proxy.ejb.StatelessSessionInterceptor.in voke(StatelessSessionInterceptor.java:100)
[junit] at org.jboss.proxy.ClientContainer.invoke(ClientConta iner.java:85)
[junit] at $Proxy5.handle(Unknown Source)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:324)
[junit] at com.transdyn.dynac.framework.ejb.access.AgnosticSl sbInvokerInterceptor.invokeBeanMethod(Unknown Source)
[junit] at com.transdyn.dynac.framework.ejb.access.AgnosticSl sbInvokerInterceptor.invoke(Unknown Source)
[junit] at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :138)
[junit] at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
[junit] at $Proxy1.handle(Unknown Source)
[junit] at com.transdyn.dynac.remoting.FrontControllerInvoker Interceptor.invoke(Unknown Source)
[junit] at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :138)
[junit] at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:152)
[junit] at $Proxy4.createMessageMultiString(Unknown Source)
[junit] at com.transdyn.dynac.device.signs.ntcip.VariableMess ageSignIntegrationTest.testCreateMessageMultiStrin gs(Unknown Source)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:324)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154 )
[junit] at junit.framework.TestCase.runBare(TestCase.java:127 )
[junit] at junit.framework.TestResult$1.protect(TestResult.ja va:106)
[junit] at junit.framework.TestResult.runProtected(TestResult .java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109 )
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnit TestRunner.run(JUnitTestRunner.java:289)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnit TestRunner.main(JUnitTestRunner.java:523)
[junit] Caused by: java.rmi.ServerException: RuntimeException; nested exception is:
[junit] java.lang.IllegalStateException: Wrong transaction association: expected TransactionImpl:XidImpl [FormatId=257, GlobalId=bcrawford-linux.transdyn.com//4327, BranchQual=] was TransactionImpl:XidImpl [FormatId=257, GlobalId=bcrawford-linux.transdyn.com//4331, BranchQual=]
[junit] at org.jboss.ejb.plugins.LogInterceptor.handleExcepti on(LogInterceptor.java:361)
[junit] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:195)
[junit] at org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122)
[junit] at org.jboss.ejb.StatelessSessionContainer.internalIn voke(StatelessSessionContainer.java:331)
[junit] at org.jboss.ejb.Container.invoke(Container.java:700)
[junit] at sun.reflect.GeneratedMethodAccessor136.invoke(Unkn own Source)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:324)
[junit] at org.jboss.mx.capability.ReflectedMBeanDispatcher.i nvoke(ReflectedMBeanDispatcher.java:284)
[junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:546)
[junit] at org.jboss.invocation.jrmp.server.JRMPInvoker.invok e(JRMPInvoker.java:367)
[junit] at sun.reflect.GeneratedMethodAccessor142.invoke(Unkn own Source)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:324)
[junit] at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:261)
[junit] at sun.rmi.transport.Transport$1.run(Transport.java:1 48)
[junit] at java.security.AccessController.doPrivileged(Native Method)
[junit] at sun.rmi.transport.Transport.serviceCall(Transport. java:144)
[junit] at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
[junit] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
[junit] at java.lang.Thread.run(Thread.java:534)
[junit] Caused by: java.lang.IllegalStateException: Wrong transaction association: expected TransactionImpl:XidImpl [FormatId=257, GlobalId=bcrawford-linux.transdyn.com//4327, BranchQual=] was TransactionImpl:XidImpl [FormatId=257, GlobalId=bcrawford-linux.transdyn.com//4331, BranchQual=]
[junit] at org.jboss.ejb.plugins.TxInterceptorCMT.endTransact ion(TxInterceptorCMT.java:383)
[junit] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:277)
[junit] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:128)
[junit] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:118)
[junit] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:191)
[junit] ... 19 more


Reply With Quote