问题描述
在网上找了很久还是没解决我的问题!我的开发环境是jboss5myeclipse7数据库oracle11gMsSql2005我要实现的功能是在一个事务里同时对2个数据库进行操作(一个事务里对一个数据库进行操作是可行的)客户端报错Exceptioninthread"main"java.util.NoSuchElementExceptionatjava.util.LinkedList.remove(UnknownSource)atjava.util.LinkedList.removeLast(UnknownSource)atorg.jboss.tm.usertx.client.ClientUserTransaction$ThreadInfo.pop(ClientUserTransaction.java:557)atorg.jboss.tm.usertx.client.ClientUserTransaction.rollback(ClientUserTransaction.java:266)atcom.wuwei.client.Client.test3(Client.java:100)atcom.wuwei.client.Client.main(Client.java:17)服务端报org.hibernate.exception.GenericJDBCException:Cannotopenconnectionatorg.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)atorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)atorg.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)atorg.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)atorg.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)atorg.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)atorg.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)atorg.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)atorg.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)atorg.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)atcom.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)atcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)atcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)atcom.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)atcom.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)atcom.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)atcom.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)atorg.jboss.tm.usertx.server.UserTransactionSessionImpl.commit(UserTransactionSessionImpl.java:171)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.jboss.tm.usertx.server.ClientUserTransactionService.invoke(ClientUserTransactionService.java:123)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)atorg.jboss.mx.server.Invocation.dispatch(Invocation.java:96)atorg.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)atorg.jboss.mx.server.Invocation.invoke(Invocation.java:90)atorg.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)atorg.jboss.mx.server.Invocation.invoke(Invocation.java:90)atorg.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)atorg.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)atorg.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)atorg.jboss.mx.server.Invocation.dispatch(Invocation.java:96)atorg.jboss.mx.server.Invocation.invoke(Invocation.java:88)atorg.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)atorg.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)atorg.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)atorg.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)atorg.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)atorg.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)atorg.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)atorg.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)Causedby:org.jboss.util.NestedSQLException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>);-nestedthrowable:(org.jboss.resource.JBossResourceException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>))atorg.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)atorg.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)...56moreCausedby:org.jboss.resource.JBossResourceException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>)atorg.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:409)atorg.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)atorg.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)atorg.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)atorg.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)...58moreCausedby:javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>atorg.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:879)atorg.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:675)atorg.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)...62more12:59:26,820WARN[arjLoggerI18N][com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2]TwoPhaseCoordinator.beforeCompletion-failedforcom.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@16364a1javax.persistence.PersistenceException:org.hibernate.exception.GenericJDBCException:Cannotopenconnectionatorg.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)atorg.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)
解决方案
解决方案二:
atcom.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)atcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)atcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)atcom.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)atcom.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)atcom.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)atcom.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)atorg.jboss.tm.usertx.server.UserTransactionSessionImpl.commit(UserTransactionSessionImpl.java:171)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.jboss.tm.usertx.server.ClientUserTransactionService.invoke(ClientUserTransactionService.java:123)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)atorg.jboss.mx.server.Invocation.dispatch(Invocation.java:96)atorg.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)atorg.jboss.mx.server.Invocation.invoke(Invocation.java:90)atorg.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)atorg.jboss.mx.server.Invocation.invoke(Invocation.java:90)atorg.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)atorg.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)atorg.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)atorg.jboss.mx.server.Invocation.dispatch(Invocation.java:96)atorg.jboss.mx.server.Invocation.invoke(Invocation.java:88)atorg.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)atorg.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)atorg.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)atorg.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)atorg.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)atorg.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)atorg.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)atorg.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)Causedby:org.hibernate.exception.GenericJDBCException:Cannotopenconnectionatorg.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)atorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)atorg.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)atorg.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)atorg.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)atorg.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)atorg.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)atorg.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)atorg.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)atorg.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)...41moreCausedby:org.jboss.util.NestedSQLException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>);-nestedthrowable:(org.jboss.resource.JBossResourceException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>))atorg.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)atorg.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)...56moreCausedby:org.jboss.resource.JBossResourceException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>)atorg.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:409)atorg.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)atorg.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)atorg.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)atorg.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)...58moreCausedby:javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:66status:ActionStatus.ABORT_ONLY>atorg.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:879)atorg.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:675)atorg.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)...62more找了些资料要我配xa的那个XML我把数据源配好后把测试表都删了然后发布entity都能映射到数据库说明我的数据源没问题但是拿客户端连接的时候还是报一样的错服务端报
解决方案三:
13:01:15,068ERROR[STDERR]javax.transaction.xa.XAException:java.sql.SQLException:无法创建XA控制连接。错误:找不到存储过程'master..xp_sqljdbc_xa_init'。。13:01:15,069ERROR[STDERR]atcom.microsoft.sqlserver.jdbc.SQLServerXAResource.start(UnknownSource)13:01:15,069ERROR[STDERR]atorg.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:213)13:01:15,069ERROR[STDERR]atcom.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:799)13:01:15,069ERROR[STDERR]atcom.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:510)13:01:15,069ERROR[STDERR]atorg.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:908)13:01:15,069ERROR[STDERR]atorg.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:662)13:01:15,069ERROR[STDERR]atorg.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)13:01:15,069ERROR[STDERR]atorg.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)13:01:15,070ERROR[STDERR]atorg.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)13:01:15,070ERROR[STDERR]atorg.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)13:01:15,070ERROR[STDERR]atorg.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)13:01:15,070ERROR[STDERR]atorg.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)13:01:15,071ERROR[STDERR]atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)13:01:15,071ERROR[STDERR]atorg.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)13:01:15,072ERROR[STDERR]atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)13:01:15,072ERROR[STDERR]atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)13:01:15,072ERROR[STDERR]atorg.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)13:01:15,073ERROR[STDERR]atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)13:01:15,073ERROR[STDERR]atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)13:01:15,073ERROR[STDERR]atorg.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)13:01:15,073ERROR[STDERR]atorg.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)13:01:15,073ERROR[STDERR]atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)13:01:15,073ERROR[STDERR]atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)13:01:15,073ERROR[STDERR]atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)13:01:15,073ERROR[STDERR]atorg.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)13:01:15,073ERROR[STDERR]atorg.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)13:01:15,073ERROR[STDERR]atorg.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)13:01:15,073ERROR[STDERR]atorg.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)13:01:15,074ERROR[STDERR]atcom.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)13:01:15,074ERROR[STDERR]atorg.jboss.tm.usertx.server.UserTransactionSessionImpl.commit(UserTransactionSessionImpl.java:171)13:01:15,074ERROR[STDERR]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)13:01:15,074ERROR[STDERR]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)13:01:15,076ERROR[STDERR]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)13:01:15,076ERROR[STDERR]atjava.lang.reflect.Method.invoke(Method.java:585)13:01:15,076ERROR[STDERR]atorg.jboss.tm.usertx.server.ClientUserTransactionService.invoke(ClientUserTransactionService.java:123)13:01:15,076ERROR[STDERR]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)13:01:15,076ERROR[STDERR]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)13:01:15,076ERROR[STDERR]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)13:01:15,076ERROR[STDERR]atjava.lang.reflect.Method.invoke(Method.java:585)13:01:15,076ERROR[STDERR]atorg.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)13:01:15,077ERROR[STDERR]atorg.jboss.mx.server.Invocation.dispatch(Invocation.java:96)13:01:15,077ERROR[STDERR]atorg.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)13:01:15,078ERROR[STDERR]atorg.jboss.mx.server.Invocation.invoke(Invocation.java:90)13:01:15,078ERROR[STDERR]atorg.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)13:01:15,078ERROR[STDERR]atorg.jboss.mx.server.Invocation.invoke(Invocation.java:90)13:01:15,078ERROR[STDERR]atorg.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)13:01:15,078ERROR[STDERR]atorg.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)13:01:15,078ERROR[STDERR]atorg.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)13:01:15,078ERROR[STDERR]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)13:01:15,078ERROR[STDERR]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)13:01:15,078ERROR[STDERR]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)13:01:15,078ERROR[STDERR]atjava.lang.reflect.Method.invoke(Method.java:585)13:01:15,078ERROR[STDERR]atorg.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)13:01:15,079ERROR[STDERR]atorg.jboss.mx.server.Invocation.dispatch(Invocation.java:96)13:01:15,079ERROR[STDERR]atorg.jboss.mx.server.Invocation.invoke(Invocation.java:88)13:01:15,079ERROR[STDERR]atorg.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)13:01:15,079ERROR[STDERR]atorg.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)13:01:15,079ERROR[STDERR]atorg.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)13:01:15,079ERROR[STDERR]atorg.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)13:01:15,079ERROR[STDERR]atorg.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)13:01:15,079ERROR[STDERR]atorg.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)13:01:15,079ERROR[STDERR]atorg.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)13:01:15,079ERROR[STDERR]atorg.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)13:01:15,080WARN[JDBCExceptionReporter]SQLError:0,SQLState:null13:01:15,080ERROR[JDBCExceptionReporter]Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:74status:ActionStatus.ABORT_ONLY>);-nestedthrowable:(org.jboss.resource.JBossResourceException:Couldnotenlistintransactiononenteringmeta-awareobject!;-nestedthrowable:(javax.transaction.SystemException:java.lang.Throwable:Unabledtoenlistresource,seethepreviouswarnings.tx=TransactionImple<ac,BasicAction:3d968beb:c2e7:4b3213c4:74status:ActionStatus.ABORT_ONLY>))13:01:15,080ERROR[AbstractFlushingEventListener]Couldnotsynchronizedatabasestatewithsessionorg.hibernate.exception.GenericJDBCException:Cannotopenconnection
解决方案四:
太长了,没想看。
解决方案五:
那能不能指导下JTA分布式管理事务数据源是配置xa_ds的XML还是普通的dsxml呢?
解决方案六:
难道问题真的太长没人愿意看吗?
解决方案七:
我也遇到这个问题,没找到解决方法,期待中...
解决方案八:
呵,终于有人走过我的路了
解决方案九:
试试:在/server/default/conf文件夹中jbossjta-properties.xml文件里<propertiesdepends="arjuna"name="jta">下面增加子节点<propertyname="com.arjuna.ats.jta.allowMultipleLastResources"value="true"/>不知道有没有帮助..
解决方案十:
挖沙,这么多!