SQL 服务器的两个 xa 数据源之间没有发生克隆

Cloning not happening between two xa datasources of SQL Server

我正在尝试使用 Teiid(jtds 1.3.1 驱动程序)从 SQL Server 2012 克隆数据(使用将数据从一个数据库复制到另一个数据库)到 SQL Server 2012(2 XA 数据源), 但不知何故它给了我这个错误。

2020-04-03 09:28:28,702 WARN  [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/ IJ000305: Connection error occured: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@53bb9a24[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@20f311ff connection handles=0 lastReturned=1585886308356 lastValidated=1585886207493 lastCheckedOut=1585886308702 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@2602a9fa mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool@16ee19d[pool=DSSQLSERVER20200403092646617] xaResource=XAResourceWrapperImpl@6ed5e4b8[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@20f311ff pad=false overrideRmValue=null productName=Microsoft SQL Server productVersion=11.00.2100 jndiName=java:/DSSQLSERVER20200403092646617] txSync=TransactionSynchronization@128579284{tx=Local transaction (delegate=TransactionImple < ac, BasicAction: 0:ffffc0a83801:1d1953d1:5e86b22e:4e status: ActionStatus.RUNNING >, owner=Local transaction context for provider JBoss JTA transaction provider) wasTrackByTx=true enlisted=false cancel=false}]: javax.transaction.xa.XAException: XAER_INVAL: Invalid arguments were given.
        at net.sourceforge.jtds.jdbc.XASupport.raiseXAException(XASupport.java:707)
        at net.sourceforge.jtds.jdbc.XASupport.xa_start(XASupport.java:198)
        at net.sourceforge.jtds.jdbcx.JtdsXAResource.start(JtdsXAResource.java:105)
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:259)
        at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.start(XAResourceWrapperImpl.java:215)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:741)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:423)
        at org.wildfly.transaction.client.LocalTransaction.enlistResource(LocalTransaction.java:157)
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.enlist(TxConnectionListener.java:986)
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:379)
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:554)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:970)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:792)
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
        at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:64)
        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:278)
        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:68)
        at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:201)
        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:353)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.teiid.dqp.internal.datamgr.ConnectorManager.invoke(ConnectorManager.java:229)
        at com.sun.proxy.$Proxy36.execute(Unknown Source)
        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:302)
        at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:138)
        at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:401)
        at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
        at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
        at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
        at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
        at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
        at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
        at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
        at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
        at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
        at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor.run(ThreadReuseExecutor.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    2020-04-03 09:28:28,717 WARN  [com.arjuna.ats.jta] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/ ARJUNA016089: TransactionImple.enlistResource - xa_start  - caught: XAException.XAER_INVAL for < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a83801:1d1953d1:5e86b22e:4e, node_name=1, branch_uid=0:ffffc0a83801:1d1953d1:5e86b22e:57, subordinatenodename=null, eis_name=java:/DSSQLSERVER20200403092542311 >: javax.transaction.xa.XAException: XAER_INVAL: Invalid arguments were given.
        at net.sourceforge.jtds.jdbc.XASupport.raiseXAException(XASupport.java:707)
        at net.sourceforge.jtds.jdbc.XASupport.xa_start(XASupport.java:198)
        at net.sourceforge.jtds.jdbcx.JtdsXAResource.start(JtdsXAResource.java:105)
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:259)
        at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.start(XAResourceWrapperImpl.java:215)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:741)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:423)
        at org.wildfly.transaction.client.LocalTransaction.enlistResource(LocalTransaction.java:157)
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.enlist(TxConnectionListener.java:986)
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:379)
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:554)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:970)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:792)
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
        at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:64)
        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:278)
        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:68)
        at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:201)
        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:353)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.teiid.dqp.internal.datamgr.ConnectorManager.invoke(ConnectorManager.java:229)
        at com.sun.proxy.$Proxy36.execute(Unknown Source)
        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:302)
        at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:138)
        at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:401)
        at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
        at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
        at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
        at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
        at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
        at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
        at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
        at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
        at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
        at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor.run(ThreadReuseExecutor.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/ javax.transaction.xa.XAException: XAER_INVAL: Invalid arguments were given.
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at net.sourceforge.jtds.jdbc.XASupport.raiseXAException(XASupport.java:707)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at net.sourceforge.jtds.jdbc.XASupport.xa_start(XASupport.java:198)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at net.sourceforge.jtds.jdbcx.JtdsXAResource.start(JtdsXAResource.java:105)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:259)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.start(XAResourceWrapperImpl.java:215)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:741)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:423)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.wildfly.transaction.client.LocalTransaction.enlistResource(LocalTransaction.java:157)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.enlist(TxConnectionListener.java:986)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:379)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:554)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:970)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:792)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:64)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:278)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:68)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:201)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:353)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at java.lang.reflect.Method.invoke(Method.java:498)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.datamgr.ConnectorManager.invoke(ConnectorManager.java:229)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at com.sun.proxy.$Proxy36.execute(Unknown Source)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:302)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:138)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:401)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
    
    2020-04-03 09:28:28,731 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
    
    2020-04-03 09:28:28,747 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at org.teiid.dqp.internal.process.ThreadReuseExecutor.run(ThreadReuseExecutor.java:206)
    
    2020-04-03 09:28:28,747 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    
    2020-04-03 09:28:28,747 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    
    2020-04-03 09:28:28,747 ERROR [stderr] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/     at java.lang.Thread.run(Thread.java:745)
    
    2020-04-03 09:28:28,747 WARN  [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue62) xXEXRoF5iMN/ Connector worker process failed for atomic-request=xXEXRoF5iMN/.4.0.4: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [1] SQL: INSERT INTO "XXXXXX"."dbo"."test1" ("id") VALUES (?)]
        at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:345)
        at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:82)
        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:433)
        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:392)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.teiid.dqp.internal.datamgr.ConnectorManager.invoke(ConnectorManager.java:229)
        at com.sun.proxy.$Proxy36.execute(Unknown Source)
        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:302)
        at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:138)
        at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:401)
        at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
        at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
        at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
        at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
        at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
        at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
        at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
        at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
        at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
        at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor.run(ThreadReuseExecutor.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_MARKED_ROLLBACK
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.checkTransactionActive(WrapperDataSource.java:245)
        at org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransactionActive(WrappedConnection.java:1928)
        at org.jboss.jca.adapters.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:1943)
        at org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:1917)
        at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:447)
        at org.teiid.translator.jdbc.JDBCBaseExecution.getPreparedStatement(JDBCBaseExecution.java:192)
        at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:249)
        ... 28 more

我的数据源配置如下:

<xa-datasource jndi-name="java:/DSSQLSERVER20200403092542311" pool-name="DSSQLSERVER20200403092542311">
    <xa-datasource-property name="DatabaseName">
        testsonali1
    </xa-datasource-property>
    <xa-datasource-property name="PortNumber">
        1433
    </xa-datasource-property>
    <xa-datasource-property name="ServerName">
        10.20.26.67
    </xa-datasource-property>
    <xa-datasource-property name="Instance">
        SQL2012
    </xa-datasource-property>
    <driver>sqlserver</driver>
    <xa-pool>
        <min-pool-size>4</min-pool-size>
        <max-pool-size>10</max-pool-size>
        <flush-strategy>FailingConnectionOnly</flush-strategy>
    </xa-pool>
    <security>
        <user-name>XXXXX</user-name>
        <password>XXXXXX</password>
    </security>
    <validation>
        <check-valid-connection-sql>select 1</check-valid-connection-sql>
        <validate-on-match>true</validate-on-match>
        <background-validation>false</background-validation>
    </validation>
</xa-datasource>
<xa-datasource jndi-name="java:/DSSQLSERVER20200403092646617" pool-name="DSSQLSERVER20200403092646617">
    <xa-datasource-property name="DatabaseName">
        testsonali
    </xa-datasource-property>
    <xa-datasource-property name="PortNumber">
        XXXX
    </xa-datasource-property>
    <xa-datasource-property name="ServerName">
        XXXXXX
    </xa-datasource-property>
    <xa-datasource-property name="Instance">
        XXXXXX
    </xa-datasource-property>
    <driver>sqlserver</driver>
    <xa-pool>
         <min-pool-size>4</min-pool-size>
         <max-pool-size>10</max-pool-size>
         <flush-strategy>FailingConnectionOnly</flush-strategy>
    </xa-pool>
    <security>
        <user-name>XXXXXX</user-name>
        <password>XXXXXXX</password>
    </security>
    <validation>
         <check-valid-connection-sql>select 1</check-valid-connection-sql>
         <validate-on-match>true</validate-on-match>
         <background-validation>false</background-validation>
    </validation>
</xa-datasource>

我的驱动配置如下:

<driver name="sqlserver" module="net.sourceforge.jtds">
     <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
     <xa-datasource-class>net.sourceforge.jtds.jdbcx.JtdsDataSource</xa-datasource-class>
</driver>

请帮我解决。提前致谢!!

我建议为此使用 Microsoft JDBC 驱动程序,因为在 JTDS 驱动程序中发现的 XA JOIN 几乎没有问题。