gpt4 book ai didi

java - 偶尔出现 'EJBTransactionRolledbackException: Transaction rolled back'错误挂起应用

转载 作者:行者123 更新时间:2023-12-03 23:58:17 25 4
gpt4 key购买 nike

应用程序托管在 JBoss6(版本 6.0.0.Final)中。

在生产环境中,我有时会看到以下错误:

2012-10-01 17:59:00,290 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-9) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:115) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:87) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:255) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]
at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:272) [:1.7.17]
at org.jboss.ejb3.stateless.StatelessContainer.invokeEndpoint(StatelessContainer.java:617) [:1.7.17]
at org.jboss.webservices.integration.invocation.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:137) [:6.0.0.Final]
at org.jboss.wsf.stack.cxf.AbstractInvoker._invokeInternal(AbstractInvoker.java:164) [:3.4.1.GA]
at org.jboss.wsf.stack.cxf.AbstractInvoker.invoke(AbstractInvoker.java:112) [:3.4.1.GA]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [:2.3.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [:1.6.0_23]
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [:1.6.0_23]
at java.util.concurrent.FutureTask.run(Unknown Source) [:1.6.0_23]
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [:2.3.1]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [:2.3.1]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113) [:2.3.1]
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97) [:2.3.1]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461) [:2.3.1]
at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:172) [:3.4.1.GA]
at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57) [:3.4.1.GA]
at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156) [:3.4.1.GA]
at org.jboss.wsf.stack.cxf.CXFNonSpringServletExt.invoke(CXFNonSpringServletExt.java:90) [:3.4.1.GA]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) [:2.3.1]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) [:2.3.1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Final]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) [:2.3.1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [:6.0.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:893) [:6.0.0.Final]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600) [:6.0.0.Final]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2019) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0_23]
Caused by: javax.transaction.RollbackException: ARJUNA-16063 The transaction is not active!
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1148) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119) [:6.0.0.Final]
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) [:6.0.0.Final]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:82) [:0.0.1]
... 65 more

它偶尔会每周发生一次,并且此类异常的数量会在第一次发生后的几分钟内出现,从而导致整个应用程序挂起。应用服务器重启后,应用正常运行。

直到重启,日志中有242条相同的错误:

Line 18231: 2012-10-01 17:19:24,290 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-12) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 18404: 2012-10-01 17:19:34,009 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-3) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 18559: 2012-10-01 17:19:24,728 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-7) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 19222: 2012-10-01 17:20:14,728 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-11) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 20212: 2012-10-01 17:27:22,900 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-14) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 20606: 2012-10-01 17:27:32,853 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-16) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 21258: 2012-10-01 17:28:18,540 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-21) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 21361: 2012-10-01 17:28:39,353 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-17) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 21618: 2012-10-01 17:28:39,743 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-12) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 21693: 2012-10-01 17:28:39,884 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-10) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 22428: 2012-10-01 17:38:20,509 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-2) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 23606: 2012-10-01 17:38:51,790 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-35) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 23987: 2012-10-01 17:38:42,181 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-11) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 24378: 2012-10-01 17:39:02,259 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-14) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 24625: 2012-10-01 17:39:12,306 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-50) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 25032: 2012-10-01 17:39:24,947 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-17) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 25191: 2012-10-01 17:39:34,634 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-25) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 25610: 2012-10-01 17:39:34,853 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-40) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 25690: 2012-10-01 17:39:35,009 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-23) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 25932: 2012-10-01 17:39:35,165 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-35) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 26013: 2012-10-01 17:39:45,165 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-49) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 26170: 2012-10-01 17:39:45,243 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-42) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 26331: 2012-10-01 17:39:56,712 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-81-14) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
Line 26651: 2012-10-01 17:40:08,243 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-18) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
....other hundreds of errors...
Line 64132: 2012-10-01 18:19:01,712 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] (http-ntpen1.company.name%2F80.95.224.149-444-15) Method invocation failed with exception: Transaction rolled back: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

在每个错误之前,日志中都有以下条目:

Line 18188: 2012-10-01 17:17:38,837 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12117 TransactionReaper::check timeout for TX 0:ffff505fe095:1274:505afcea:577d43 in state  RUN
Line 18189: 2012-10-01 17:17:38,868 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA-12095 Abort of action id 0:ffff505fe095:1274:505afcea:577d43 invoked while multiple threads active within it.
Line 18190: 2012-10-01 17:17:38,868 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA-12108 CheckedAction::check - atomic action 0:ffff505fe095:1274:505afcea:577d43 aborting with 1 threads active!
Line 18191: 2012-10-01 17:17:59,087 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12117 TransactionReaper::check timeout for TX 0:ffff505fe095:1274:505afcea:577d43 in state CANCEL
Line 18229: 2012-10-01 17:19:24,290 WARN [com.arjuna.ats.arjuna] (http-ntpen1.company.name%2F80.95.224.149-81-12) ARJUNA-12077 Abort called on already aborted atomic action 0:ffff505fe095:1274:505afcea:577d43

应用程序本身是一组 SOAP 网络服务和动态 JSF/Richfaces 网页。大多数逻辑位于无状态 bean (@Stateless) 中。

我的猜测是,有时调用 Web 服务会花费太多时间,从而导致 EJBTransactionRolledbackException。问题是为什么有时它会挂起整个应用程序?此外,异常堆栈跟踪不包含应用程序代码中的调用。

会不会是因为池(stateless bean objects pool)用完了?

最佳答案

如果没有实际代码,这只是一个猜测,但这可能是错误的影响 EJBTHREE-2238存在于 JBoss 6.0.0 final 中。

关于java - 偶尔出现 'EJBTransactionRolledbackException: Transaction rolled back'错误挂起应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12748643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com