内部异常:java.sql.SQLException:事务无法继续STATUS_COMMITTED
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了内部异常:java.sql.SQLException:事务无法继续STATUS_COMMITTED相关的知识,希望对你有一定的参考价值。
我们这里有一个带有eclipselink的JBoss应用程序。在大多数情况下,一切正常,应用程序运行正常。但在某些时候我们得到“交易无法继续STATUS_COMMITTED”,我们不知道为什么。有趣的是,我们在进入EJB容器时得到异常......
在哪些情况下可能发生错误?
server.log中的错误:
15:17:18,450 INFO [stdout] (Thread-168) [EL Info]: 2015-09-30 15:17:18.449--ServerSession(488658700)--Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException
15:17:18,453 INFO [stdout] (Thread-168) Internal Exception: java.sql.SQLException: Transaction cannot proceed STATUS_COMMITTED
15:17:18,454 INFO [stdout] (Thread-168) Error Code: 0
15:17:18,454 INFO [stdout] (Thread-168) Call: SELECT id, closed, changeSetID, xyFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?)
15:17:18,455 INFO [stdout] (Thread-168) bind => [1 parameter bound]
15:17:18,456 INFO [stdout] (Thread-168) Query: ReadAllQuery(name="fileVersions" referenceClass=ChangeSetFileVersion sql="SELECT id, closed, changeSetID, xyFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?)").
StackTrace的有趣部分:
15:17:28,550 WARN [com.arjuna.ats.jta] (Thread-168) ARJUNA016029: SynchronizationImple.afterCompletion - failed for org.eclipse.persistence.transaction.JTASynchronizationListener@5c4b3928 with exception: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Transaction cannot proceed STATUS_COMMITTED
Error Code: 0
Call: SELECT id, closed, changeSetID, xyFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?)
bind => [1 parameter bound]
Query: ReadAllQuery(name="fileVersions" referenceClass=ChangeSetFileVersion sql="SELECT id, closed, changeSetID, xyFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?)")
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl$1.handleException(EntityManagerSetupImpl.java:696) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.handleException(AbstractSynchronizationListener.java:275) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:242) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:79) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:232) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at con.xy.view.fileExplorer.UploadFilesCtlrBean$$$view95.moveFiles(Unknown Source) [c-onxyModel.jar:2.3 Build 1290]
at con.xy.vaadin.fileExplorer.UploadFilesView.updateModelValues(UploadFilesView.java:926) [c-onxyVaadin.jar:2.3 Build 1290]
at con.xy.vaadin.util.XYViewComponent.doOk(XYViewComponent.java:411) [c-onXYVaadin.jar:2.3 Build 1290]
at con.xy.vaadin.util.XYViewComponent.access$000(XYViewComponent.java:41) [c-onXYVaadin.jar:2.3 Build 1290]
at con.xy.vaadin.util.XYViewComponent$DoOkWorker.workOutThread(XYViewComponent.java:668) [c-onXYVaadin.jar:2.3 Build 1290]
at con.xy.vaadin.util.ThreadSwitcher.run(ThreadSwitcher.java:40) [c-onXYVaadin.jar:2.3 Build 1290]
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Transaction cannot proceed STATUS_COMMITTED
Error Code: 0
Call: SELECT id, closed, changeSetID, xyFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?)
bind => [1 parameter bound]
Query: ReadAllQuery(name="fileVersions" referenceClass=ChangeSetFileVersion sql="SELECT id, closed, changeSetID, xyFileVersionID FROM File.CHANGESETFILEVERSION WHERE (changeSetID = ?)")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1611) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:674) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1991) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:3203) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1793) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1863) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.retryQuery(DatabaseSessionImpl.java:999) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1829) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1863) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.retryQuery(DatabaseSessionImpl.java:999) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1829) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1863) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.retryQuery(DatabaseSessionImpl.java:999) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1829) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1863) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.retryQuery(DatabaseSessionImpl.java:999) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1829) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1775) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:129) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:116) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:89) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.indirection.IndirectList.buildDelegate(IndirectList.java:252) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.indirection.IndirectList.getDelegate(IndirectList.java:423) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.indirection.IndirectList.size(IndirectList.java:761) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.queries.CollectionContainerPolicy.sizeFor(CollectionContainerPolicy.java:177) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.mappings.CollectionMapping.mergeIntoObject(CollectionMapping.java:1520) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:4128) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:4061) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:884) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:698) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:309) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.mappings.CollectionMapping.mergeChangesIntoObject(CollectionMapping.java:1451) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:4070) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:884) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:698) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:309) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.mappings.ObjectReferenceMapping.mergeIntoObject(ObjectReferenceMapping.java:497) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:4128) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:4061) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:839) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:698) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:309) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.mappings.ObjectReferenceMapping.mergeIntoObject(ObjectReferenceMapping.java:497) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:4128) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:4061) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:839) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:698) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:309) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.mappings.ObjectReferenceMapping.mergeIntoObject(ObjectReferenceMapping.java:497) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:4128) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:4061) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:839) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:698) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:309) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent(UnitOfWorkImpl.java:3280) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.mergeChangesIntoParent(RepeatableWriteUnitOfWork.java:376) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeClonesAfterCompletion(UnitOfWorkImpl.java:3412) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:217) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
... 35 more
Caused by: java.sql.SQLException: Transaction cannot proceed STATUS_COMMITTED
at org.jboss.jca.adapters.jdbc.WrapperDataSource.checkTransactionActive(WrapperDataSource.java:240)
at org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransactionActive(WrappedConnection.java:1599)
at org.jboss.jca.adapters.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:1614)
at org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:1588)
at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:397)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1556) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1505) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:778) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:619) [eclipselink.jar:2.5.1.v20130918-f2b9fc5]
... 104 more
UPDATE
错误发生在上周的另一个时间。在分析了日志之后,似乎Exception在离开EJB容器时是刺,而不是在进入它时。也可以在eclipselink论坛上发布这个帖子:
似乎这是eclipselink中的一个错误。我已经向eclipselink团队发布了一个错误:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=481185
虽然与JBoss EAP 7.0中的Hibernate 5以及连接到MS SQLServerExpress的JTA数据源也发生了轻微的关联,但Red Hat表示这不会发生在JBoss 4中,只有JBoss 6及更高版本。您可能无法查看完整的解决方案,除非您有红帽支持帐户,但here是链接。在EAP 6及更高版本的提交期间标记为“事务无法继续STATUS_COMMITTED”的问题和解决方案“
我确实在提交失败的每次尝试提交时都得到了异常。红帽基本上说“使用首次获得连接时注册的插入同步来根据需要清理连接上下文”
他们说根本原因是“在EAP 6中不支持在事务生命周期的afterCompletion阶段使用数据源连接”
他们还参考了Iron Jacamar关于交易边界的有效使用连接的discussion。
它们提供了作为org.hibernate.connection.ConnectionProvider实现提供的自定义代码,并且请参阅Table 3.4. Hibernate JDBC and Connection Properties中的hibernate.connection.provider_class属性定义。
希望这可能会帮助其他人,无论他们是否使用EclipseLink或Hibernate。
以上是关于内部异常:java.sql.SQLException:事务无法继续STATUS_COMMITTED的主要内容,如果未能解决你的问题,请参考以下文章
为啥内部异常到达 ThreadException 处理程序而不是实际抛出的异常?