我没有运气寻找可能导致JPA交易中止的原因。我们有一个应用程序部署在JBoss EAP 2.6.0上,使用EclipseLink 2.4作为我们的JPA提供程序(而不是Hibernate)。我们经常遇到这个错误,我希望有人能给我任何关于原因的线索。
更新
我们已经隔离了当我们的进程调用RESTful Web服务时发生的问题。有时这个电话会产生一个
java.net.SocketException: Unexpected end of file from server
在我们得到该异常后,我们开始看到中止的交易问题。有关获取套接字异常的原因的任何想法都会中止JPA事务吗?
2014 Aug 27 13:46:06,055 MDT DVCProcessor [EJB default - 1] ERROR my.package.processor.ModemProcessor - : Failed migration, unexpected error
javax.ejb.EJBTransactionRolledbackException:
Exception Description: Error binding to externally managed transaction
Internal Exception: javax.transaction.RollbackException: ARJUNA016083: Can't register synchronization because the transaction is in aborted state
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:162) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:252) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:341) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182) [jboss-as-ee-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) ~[jboss-as-ee-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at my.package.datamodel.service.DVCDataService$$$view5.find(Unknown Source) ~[dvc-data-model-1.0-SNAPSHOT.jar:na]
<... snip ...>
at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:73) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final-redhat-1.jar!/:2.1.1.Final-redhat-1]
Caused by: org.eclipse.persistence.exceptions.TransactionException:
Exception Description: Error binding to externally managed transaction
Internal Exception: javax.transaction.RollbackException: ARJUNA016083: Can't register synchronization because the transaction is in aborted state
at org.eclipse.persistence.exceptions.TransactionException.errorBindingToExternalTransaction(TransactionException.java:71) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.transaction.AbstractTransactionController.bindToCurrentTransaction(AbstractTransactionController.java:120) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.transaction.AbstractTransactionController.registerSynchronizationListener(AbstractTransactionController.java:413) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerWithTransactionIfRequired(UnitOfWorkImpl.java:4379) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.internal.jpa.transaction.JTATransactionWrapper.registerUnitOfWorkWithTxn(JTATransactionWrapper.java:90) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getActivePersistenceContext(EntityManagerImpl.java:1738) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getActiveSession(EntityManagerImpl.java:1172) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:662) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:543) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.jboss.as.jpa.container.AbstractEntityManager.find(AbstractEntityManager.java:193) ~[jboss-as-jpa-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
at my.package.datamodel.service.DVCDataService.find(DVCDataService.java:57) ~[dvc-data-model-1.0-SNAPSHOT.jar:na]
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[na:na]
<... snip ...>
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar!/:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:250) [jboss-as-ejb3-7.3.0.Final-redhat-14.jar!/:7.3.0.Final-redhat-14]
... 82 common frames omitted
Caused by: javax.transaction.RollbackException: ARJUNA016083: Can't register synchronization because the transaction is in aborted state
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:370) ~[na:na]
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronization(TransactionImple.java:351) ~[na:na]
at org.eclipse.persistence.transaction.JTATransactionController.registerSynchronization_impl(JTATransactionController.java:92) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
at org.eclipse.persistence.transaction.AbstractTransactionController.bindToCurrentTransaction(AbstractTransactionController.java:116) ~[eclipselink-2.4.0.jar!/:2.4.0.v20120608-r11652]
... 121 common frames omitted