java.lang.IllegalStateException: Only beans with user-managed transactions can invoke getUserTransaction() at com.evermind.server.ejb.AbstractEJBContext.getUser Transaction(AbstractEJBContext.java:262) at de.solutionary.bps.session.tankfarm.VorgangsEditor SImpl.addAbrechnungsVorgang(VorgangsEditorSImpl.ja va:2591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)

Spring JIRA | Alexander Schulz | 1 decade ago
  1. 0

    Calling TransactionAspectSupport.currentTransactionStatus( ).setRollbackOnly() result in an EJBException on transaction end. The client receives this Exception instead of receiving the normal return object. It seems like Spring is using UserTransaction to set rollback, but this is prohibited in CMT by EJB 2.1 specification. Using pure CMT with ejbContext.setRollbackOnly is working correctly. My bean configuration looks like this <bean id="BestandsBerechnerSTarget" class="de.solutionary.bps.session.bestandsfuehrung .BestandsBerechnerSImpl"></bean> <bean id="BestandsBerechnerSIntern" class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean"> <property name="transactionManager" ref="jtaTM" /> <property name="target" ref="BestandsBerechnerSTarget" /> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED,timeout_500</prop> </props> </property> </bean> <bean id="BestandsBerechnerS" class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean"> <property name="jndiName"> <value>java:comp/env/ejb/BestandsBerechnerSLocal</value> </property> <property name="businessInterface"> <value>de.solutionary.bps.session.bestandsfuehrung .BestandsBerechnerSBI</value> </property> </bean> Here is the stacktrace: 2006-09-04 10:50:06,894 ERROR (VorgangDetail.java:789) # Exception: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException javax.transaction.RollbackException at com.evermind.server.ApplicationServerTransaction.c heckForRollbackOnlyWhileInCommit(ApplicationServer Transaction.java:537) at com.evermind.server.ApplicationServerTransaction.d oCommit(ApplicationServerTransaction.java:240) at com.evermind.server.ApplicationServerTransaction.c ommit(ApplicationServerTransaction.java:126) at com.evermind.server.ApplicationServerTransactionMa nager.commit(ApplicationServerTransactionManager.j ava:433) at com.evermind.server.ApplicationServer$2.commit(App licationServer.java:4540) at com.evermind.server.ejb.EJBTransactionManager.end( EJBTransactionManager.java:136) at com.evermind.server.ejb.interceptor.system.TxRequi redInterceptor.invoke(TxRequiredInterceptor.java:6 3) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.StatelessSessionEJBObject. OC4J_invokeMethod(StatelessSessionEJBObject.java:8 6) at VorgangsEditorSLocal_StatelessSessionBeanWrapper0. addAbrechnungsVorgang(VorgangsEditorSLocal_Statele ssSessionBeanWrapper0.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.ejb.access.LocalSlsbInvokerInt erceptor.invoke(LocalSlsbInvokerInterceptor.java:7 1) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176) at $Proxy36.addAbrechnungsVorgang(Unknown Source) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .speichern(VorgangDetail.java:741) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .reactOnSpeichern(VorgangDetail.java:477) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.gasx.casabac.control.GXDialogElement.invokeAct ionMethod(GXDialogElement.java:188) at com.gasx.casabac.control.GXButton.onButton(GXButto n.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.softwareag.cis.server.InteractionModel.invokeM ethodInternally(Unknown Source) at com.softwareag.cis.server.InteractionModel.invokeM ethod(Unknown Source) at com.softwareag.cis.server.XMLProcessor.processXML( Unknown Source) at com.softwareag.cis.server.Connector.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet .java:763) at javax.servlet.http.HttpServlet.service(HttpServlet .java:856) at com.evermind.server.http.ServletRequestDispatcher. invoke(ServletRequestDispatcher.java:719) at com.evermind.server.http.ServletRequestDispatcher. forwardInternal(ServletRequestDispatcher.java:376) at com.evermind.server.http.HttpRequestHandler.doProc essRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.proces sRequest(HttpRequestHandler.java:451) at com.evermind.server.http.HttpRequestHandler.serveO neRequest(HttpRequestHandler.java:218) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:119) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRu nnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:303) at java.lang.Thread.run(Thread.java:595) javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException at com.evermind.server.ejb.EJBUtils.createEJBExceptio n(EJBUtils.java:352) at com.evermind.server.ejb.EJBTransactionManager.end( EJBTransactionManager.java:143) at com.evermind.server.ejb.interceptor.system.TxRequi redInterceptor.invoke(TxRequiredInterceptor.java:6 3) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.StatelessSessionEJBObject. OC4J_invokeMethod(StatelessSessionEJBObject.java:8 6) at VorgangsEditorSLocal_StatelessSessionBeanWrapper0. addAbrechnungsVorgang(VorgangsEditorSLocal_Statele ssSessionBeanWrapper0.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.ejb.access.LocalSlsbInvokerInt erceptor.invoke(LocalSlsbInvokerInterceptor.java:7 1) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176) at $Proxy36.addAbrechnungsVorgang(Unknown Source) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .speichern(VorgangDetail.java:741) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .reactOnSpeichern(VorgangDetail.java:477) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.gasx.casabac.control.GXDialogElement.invokeAct ionMethod(GXDialogElement.java:188) at com.gasx.casabac.control.GXButton.onButton(GXButto n.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.softwareag.cis.server.InteractionModel.invokeM ethodInternally(Unknown Source) at com.softwareag.cis.server.InteractionModel.invokeM ethod(Unknown Source) at com.softwareag.cis.server.XMLProcessor.processXML( Unknown Source) at com.softwareag.cis.server.Connector.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet .java:763) at javax.servlet.http.HttpServlet.service(HttpServlet .java:856) at com.evermind.server.http.ServletRequestDispatcher. invoke(ServletRequestDispatcher.java:719) at com.evermind.server.http.ServletRequestDispatcher. forwardInternal(ServletRequestDispatcher.java:376) at com.evermind.server.http.HttpRequestHandler.doProc essRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.proces sRequest(HttpRequestHandler.java:451) at com.evermind.server.http.HttpRequestHandler.serveO neRequest(HttpRequestHandler.java:218) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:119) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRu nnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:303) at java.lang.Thread.run(Thread.java:595) Caused by: javax.transaction.RollbackException at com.evermind.server.ApplicationServerTransaction.c heckForRollbackOnlyWhileInCommit(ApplicationServer Transaction.java:537) at com.evermind.server.ApplicationServerTransaction.d oCommit(ApplicationServerTransaction.java:240) at com.evermind.server.ApplicationServerTransaction.c ommit(ApplicationServerTransaction.java:126) at com.evermind.server.ApplicationServerTransactionMa nager.commit(ApplicationServerTransactionManager.j ava:433) at com.evermind.server.ApplicationServer$2.commit(App licationServer.java:4540) at com.evermind.server.ejb.EJBTransactionManager.end( EJBTransactionManager.java:136) ... 42 more If I'm calling ejbContext.getUserTransaction().setRollbackOnly() in a pure CMT environment without Spring the following Exception is raised: 2006-09-05 10:52:24,031 FATAL (VorgangsEditorSImpl.java:2599) # java.lang.IllegalStateException: Only beans with user-managed transactions can invoke getUserTransaction() at com.evermind.server.ejb.AbstractEJBContext.getUser Transaction(AbstractEJBContext.java:262) at de.solutionary.bps.session.tankfarm.VorgangsEditor SImpl.addAbrechnungsVorgang(VorgangsEditorSImpl.ja va:2591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:181) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :148) at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:96) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176) at $Proxy36.addAbrechnungsVorgang(Unknown Source) at de.solutionary.bps.session.tankfarm.VorgangsEditor SBean.addAbrechnungsVorgang(VorgangsEditorSBean.ja va:654) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.evermind.server.ejb.interceptor.joinpoint.EJBJ oinPointImpl.invoke(EJBJoinPointImpl.java:35) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.TxRequi redInterceptor.invoke(TxRequiredInterceptor.java:5 5) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.StatelessSessionEJBObject. OC4J_invokeMethod(StatelessSessionEJBObject.java:8 6) at VorgangsEditorSLocal_StatelessSessionBeanWrapper0. addAbrechnungsVorgang(VorgangsEditorSLocal_Statele ssSessionBeanWrapper0.java:141) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .speichern(VorgangDetail.java:747) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .reactOnSpeichern(VorgangDetail.java:482) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.gasx.casabac.control.GXDialogElement.invokeAct ionMethod(GXDialogElement.java:188) at com.gasx.casabac.control.GXButton.onButton(GXButto n.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.softwareag.cis.server.InteractionModel.invokeM ethodInternally(Unknown Source) at com.softwareag.cis.server.InteractionModel.invokeM ethod(Unknown Source) at com.softwareag.cis.server.XMLProcessor.processXML( Unknown Source) at com.softwareag.cis.server.Connector.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet .java:763) at javax.servlet.http.HttpServlet.service(HttpServlet .java:856) at com.evermind.server.http.ServletRequestDispatcher. invoke(ServletRequestDispatcher.java:719) at com.evermind.server.http.ServletRequestDispatcher. forwardInternal(ServletRequestDispatcher.java:376) at com.evermind.server.http.HttpRequestHandler.doProc essRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.proces sRequest(HttpRequestHandler.java:451) at com.evermind.server.http.HttpRequestHandler.serveO neRequest(HttpRequestHandler.java:218) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:119) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRu nnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:303) at java.lang.Thread.run(Thread.java:595)

    Spring JIRA | 1 decade ago | Alexander Schulz
    java.lang.IllegalStateException: Only beans with user-managed transactions can invoke getUserTransaction() at com.evermind.server.ejb.AbstractEJBContext.getUser Transaction(AbstractEJBContext.java:262) at de.solutionary.bps.session.tankfarm.VorgangsEditor SImpl.addAbrechnungsVorgang(VorgangsEditorSImpl.ja va:2591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
  2. 0

    Calling TransactionAspectSupport.currentTransactionStatus( ).setRollbackOnly() result in an EJBException on transaction end. The client receives this Exception instead of receiving the normal return object. It seems like Spring is using UserTransaction to set rollback, but this is prohibited in CMT by EJB 2.1 specification. Using pure CMT with ejbContext.setRollbackOnly is working correctly. My bean configuration looks like this <bean id="BestandsBerechnerSTarget" class="de.solutionary.bps.session.bestandsfuehrung .BestandsBerechnerSImpl"></bean> <bean id="BestandsBerechnerSIntern" class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean"> <property name="transactionManager" ref="jtaTM" /> <property name="target" ref="BestandsBerechnerSTarget" /> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED,timeout_500</prop> </props> </property> </bean> <bean id="BestandsBerechnerS" class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean"> <property name="jndiName"> <value>java:comp/env/ejb/BestandsBerechnerSLocal</value> </property> <property name="businessInterface"> <value>de.solutionary.bps.session.bestandsfuehrung .BestandsBerechnerSBI</value> </property> </bean> Here is the stacktrace: 2006-09-04 10:50:06,894 ERROR (VorgangDetail.java:789) # Exception: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException javax.transaction.RollbackException at com.evermind.server.ApplicationServerTransaction.c heckForRollbackOnlyWhileInCommit(ApplicationServer Transaction.java:537) at com.evermind.server.ApplicationServerTransaction.d oCommit(ApplicationServerTransaction.java:240) at com.evermind.server.ApplicationServerTransaction.c ommit(ApplicationServerTransaction.java:126) at com.evermind.server.ApplicationServerTransactionMa nager.commit(ApplicationServerTransactionManager.j ava:433) at com.evermind.server.ApplicationServer$2.commit(App licationServer.java:4540) at com.evermind.server.ejb.EJBTransactionManager.end( EJBTransactionManager.java:136) at com.evermind.server.ejb.interceptor.system.TxRequi redInterceptor.invoke(TxRequiredInterceptor.java:6 3) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.StatelessSessionEJBObject. OC4J_invokeMethod(StatelessSessionEJBObject.java:8 6) at VorgangsEditorSLocal_StatelessSessionBeanWrapper0. addAbrechnungsVorgang(VorgangsEditorSLocal_Statele ssSessionBeanWrapper0.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.ejb.access.LocalSlsbInvokerInt erceptor.invoke(LocalSlsbInvokerInterceptor.java:7 1) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176) at $Proxy36.addAbrechnungsVorgang(Unknown Source) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .speichern(VorgangDetail.java:741) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .reactOnSpeichern(VorgangDetail.java:477) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.gasx.casabac.control.GXDialogElement.invokeAct ionMethod(GXDialogElement.java:188) at com.gasx.casabac.control.GXButton.onButton(GXButto n.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.softwareag.cis.server.InteractionModel.invokeM ethodInternally(Unknown Source) at com.softwareag.cis.server.InteractionModel.invokeM ethod(Unknown Source) at com.softwareag.cis.server.XMLProcessor.processXML( Unknown Source) at com.softwareag.cis.server.Connector.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet .java:763) at javax.servlet.http.HttpServlet.service(HttpServlet .java:856) at com.evermind.server.http.ServletRequestDispatcher. invoke(ServletRequestDispatcher.java:719) at com.evermind.server.http.ServletRequestDispatcher. forwardInternal(ServletRequestDispatcher.java:376) at com.evermind.server.http.HttpRequestHandler.doProc essRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.proces sRequest(HttpRequestHandler.java:451) at com.evermind.server.http.HttpRequestHandler.serveO neRequest(HttpRequestHandler.java:218) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:119) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRu nnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:303) at java.lang.Thread.run(Thread.java:595) javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException at com.evermind.server.ejb.EJBUtils.createEJBExceptio n(EJBUtils.java:352) at com.evermind.server.ejb.EJBTransactionManager.end( EJBTransactionManager.java:143) at com.evermind.server.ejb.interceptor.system.TxRequi redInterceptor.invoke(TxRequiredInterceptor.java:6 3) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.StatelessSessionEJBObject. OC4J_invokeMethod(StatelessSessionEJBObject.java:8 6) at VorgangsEditorSLocal_StatelessSessionBeanWrapper0. addAbrechnungsVorgang(VorgangsEditorSLocal_Statele ssSessionBeanWrapper0.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.ejb.access.LocalSlsbInvokerInt erceptor.invoke(LocalSlsbInvokerInterceptor.java:7 1) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176) at $Proxy36.addAbrechnungsVorgang(Unknown Source) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .speichern(VorgangDetail.java:741) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .reactOnSpeichern(VorgangDetail.java:477) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.gasx.casabac.control.GXDialogElement.invokeAct ionMethod(GXDialogElement.java:188) at com.gasx.casabac.control.GXButton.onButton(GXButto n.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.softwareag.cis.server.InteractionModel.invokeM ethodInternally(Unknown Source) at com.softwareag.cis.server.InteractionModel.invokeM ethod(Unknown Source) at com.softwareag.cis.server.XMLProcessor.processXML( Unknown Source) at com.softwareag.cis.server.Connector.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet .java:763) at javax.servlet.http.HttpServlet.service(HttpServlet .java:856) at com.evermind.server.http.ServletRequestDispatcher. invoke(ServletRequestDispatcher.java:719) at com.evermind.server.http.ServletRequestDispatcher. forwardInternal(ServletRequestDispatcher.java:376) at com.evermind.server.http.HttpRequestHandler.doProc essRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.proces sRequest(HttpRequestHandler.java:451) at com.evermind.server.http.HttpRequestHandler.serveO neRequest(HttpRequestHandler.java:218) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:119) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRu nnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:303) at java.lang.Thread.run(Thread.java:595) Caused by: javax.transaction.RollbackException at com.evermind.server.ApplicationServerTransaction.c heckForRollbackOnlyWhileInCommit(ApplicationServer Transaction.java:537) at com.evermind.server.ApplicationServerTransaction.d oCommit(ApplicationServerTransaction.java:240) at com.evermind.server.ApplicationServerTransaction.c ommit(ApplicationServerTransaction.java:126) at com.evermind.server.ApplicationServerTransactionMa nager.commit(ApplicationServerTransactionManager.j ava:433) at com.evermind.server.ApplicationServer$2.commit(App licationServer.java:4540) at com.evermind.server.ejb.EJBTransactionManager.end( EJBTransactionManager.java:136) ... 42 more If I'm calling ejbContext.getUserTransaction().setRollbackOnly() in a pure CMT environment without Spring the following Exception is raised: 2006-09-05 10:52:24,031 FATAL (VorgangsEditorSImpl.java:2599) # java.lang.IllegalStateException: Only beans with user-managed transactions can invoke getUserTransaction() at com.evermind.server.ejb.AbstractEJBContext.getUser Transaction(AbstractEJBContext.java:262) at de.solutionary.bps.session.tankfarm.VorgangsEditor SImpl.addAbrechnungsVorgang(VorgangsEditorSImpl.ja va:2591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:181) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :148) at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:96) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176) at $Proxy36.addAbrechnungsVorgang(Unknown Source) at de.solutionary.bps.session.tankfarm.VorgangsEditor SBean.addAbrechnungsVorgang(VorgangsEditorSBean.ja va:654) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.evermind.server.ejb.interceptor.joinpoint.EJBJ oinPointImpl.invoke(EJBJoinPointImpl.java:35) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.TxRequi redInterceptor.invoke(TxRequiredInterceptor.java:5 5) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.interceptor.system.DMSInte rceptor.invoke(DMSInterceptor.java:52) at com.evermind.server.ejb.interceptor.InvocationCont extImpl.proceed(InvocationContextImpl.java:69) at com.evermind.server.ejb.StatelessSessionEJBObject. OC4J_invokeMethod(StatelessSessionEJBObject.java:8 6) at VorgangsEditorSLocal_StatelessSessionBeanWrapper0. addAbrechnungsVorgang(VorgangsEditorSLocal_Statele ssSessionBeanWrapper0.java:141) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .speichern(VorgangDetail.java:747) at de.mummert.abrechnung.web.abrechnung.VorgangDetail .reactOnSpeichern(VorgangDetail.java:482) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.gasx.casabac.control.GXDialogElement.invokeAct ionMethod(GXDialogElement.java:188) at com.gasx.casabac.control.GXButton.onButton(GXButto n.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.softwareag.cis.server.InteractionModel.invokeM ethodInternally(Unknown Source) at com.softwareag.cis.server.InteractionModel.invokeM ethod(Unknown Source) at com.softwareag.cis.server.XMLProcessor.processXML( Unknown Source) at com.softwareag.cis.server.Connector.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet .java:763) at javax.servlet.http.HttpServlet.service(HttpServlet .java:856) at com.evermind.server.http.ServletRequestDispatcher. invoke(ServletRequestDispatcher.java:719) at com.evermind.server.http.ServletRequestDispatcher. forwardInternal(ServletRequestDispatcher.java:376) at com.evermind.server.http.HttpRequestHandler.doProc essRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.proces sRequest(HttpRequestHandler.java:451) at com.evermind.server.http.HttpRequestHandler.serveO neRequest(HttpRequestHandler.java:218) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:119) at com.evermind.server.http.HttpRequestHandler.run(Ht tpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRu nnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:303) at java.lang.Thread.run(Thread.java:595)

    Spring JIRA | 1 decade ago | Alexander Schulz
    java.lang.IllegalStateException: Only beans with user-managed transactions can invoke getUserTransaction() at com.evermind.server.ejb.AbstractEJBContext.getUser Transaction(AbstractEJBContext.java:262) at de.solutionary.bps.session.tankfarm.VorgangsEditor SImpl.addAbrechnungsVorgang(VorgangsEditorSImpl.ja va:2591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
  3. 0

    java.lang.IllegalStateException: Cannot create a session after the response has been committed - Toolbox for IT Groups

    ittoolbox.com | 7 months ago
    java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.coyote.tomcat5.CoyoteRequest.doGetS ession(CoyoteRequest.java: 2456) at org.apache.coyote.tomcat5.CoyoteRequest.getSes sion(CoyoteRequest.java:22 91) at org.apache.coyote.tomcat5.CoyoteRequestFacade. getSession(CoyoteRequestFa cade.java:838) at javax.servlet.http.HttpServletRequestWrapper.g etSession(HttpServletReque stWrapper.java:265) at org.apache.catalina.core.ApplicationHttpReques t.getSession(ApplicationHt tpRequest.java:557) at javax.servlet.http.HttpServletRequestWrapper.g etSession(HttpServletReque stWrapper.java:265) at org.apache.catalina.core.ApplicationHttpReques t.getSession(ApplicationHt tpRequest.java:557) at org.apache.catalina.core.ApplicationHttpReques t.getSession(ApplicationHt tpRequest.java:501) at org.apache.jasper.runtime.PageContextImpl._ini tialize(PageContextImpl.ja va:152) at org.apache.jasper.runtime.PageContextImpl.init ialize(PageContextImpl.jav a:127) at org.apache.jasper.runtime.JspFactoryImpl.inter nalGetPageContext(JspFacto ryImpl.java:109) at org.apache.jasper.runtime.JspFactoryImpl.acces s$000(JspFactoryImpl.java: 42) at org.apache.jasper.runtime.JspFactoryImpl$Privi legedGetPageContext.run(Js pFactoryImpl.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.runtime.JspFactoryImpl.getPa geContext(JspFactoryImpl.j ava:64) at org.apache.jsp.jsp.rpt.svc_005fusage_005fdetai l_005frpt_jsp._jspService( svc_005fusage_005fdetail_005frpt_jsp.java:117) at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet .java:860) at org.apache.jasper.servlet.JspServletWrapper.se rvice(JspServletWrapper.ja va:336) at org.apache.jasper.servlet.JspServlet.serviceJs pFile(JspServlet.java:302) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:251) at javax.servlet.http.HttpServlet.service(HttpServlet .java:860) at sun.reflect.GeneratedMethodAccessor187.invoke(Unkn own Source) at sun.reflect.DelegatingMethodAccessorImpl.invok e(DelegatingMethodAccessor Impl.java:25)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: jpa provider

    cayenne-user | 9 years ago | Andrus Adamchik
    java.lang.IllegalStateException: Attempt to add a transformer >>> failed - instrumentation is not initialized. >>> at >>> org >>> .apache >>> .cayenne >>> .jpa >>> .instrument >>> .InstrumentingUnit.addTransformer(InstrumentingUnit.java:69) >>> at >>> org >>> .apache >>> .cayenne >>> .jpa.Provider.createContainerEntityManagerFactory(Provider.java:243) >>> at >>> org >>> .apache >>> .cayenne.jpa.Provider.createEntityManagerFactory(Provider.java:194) >>> at >>> javax >>> .persistence >>> .Persistence.createEntityManagerFactory(Persistence.java:83) >>> at >>> javax >>> .persistence >>> .Persistence.createEntityManagerFactory(Persistence.java:60) >>> at >>> com >>> .gilbertoca >>> .gfi.service.PessoaServiceTest.setUp(PessoaServiceTest.java:32) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  6. 0

    开源中国(OSChina.NET)

    oschina.net | 1 year ago
    java.lang.IllegalStateException: Tomcat connector in failed state at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServle tContainer.start(TomcatEmbeddedServletContainer.java:157) at org.springframework.boot.context.embedded.EmbeddedWebApplicationConte xt.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288) at org.springframework.boot.context.embedded.EmbeddedWebApplicationConte xt.finishRefresh(EmbeddedWebApplicationContext.java:141) at org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:483) at org.springframework.boot.context.embedded.EmbeddedWebApplicationConte xt.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication. java:686) at org.springframework.boot.SpringApplication.run(SpringApplication.java :320) at org.springframework.boot.SpringApplication.run(SpringApplication.java :957) at org.springframework.boot.SpringApplication.run(SpringApplication.java :946) at com.baidu.rigel.biplatform.tesseract.application.TesseractApplication .main(TesseractApplication.java:63)

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Only beans with user-managed transactions can invoke getUserTransaction() at com.evermind.server.ejb.AbstractEJBContext.getUser Transaction(AbstractEJBContext.java:262) at de.solutionary.bps.session.tankfarm.VorgangsEditor SImpl.addAbrechnungsVorgang(VorgangsEditorSImpl.ja va:2591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke()
    2. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java:585)
      1 frame