I modified Spring-Boot Camel XA Transactions quickstart to use AMQ-7 and MSSQL 2012. The reproducer is setup for the old MSSQL 2012 which is not supported anymore. However, it doesn't work with MSSQL 2014 & 2016 neither.
When I want to commit, I hit following exception:
org.springframework.transaction.HeuristicCompletionException: Heuristic completion: outcome state is mixed; nested exception is javax.transaction.HeuristicMixedException at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1028) ~[spring-tx-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:765) ~[spring-tx-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:734) ~[spring-tx-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150) ~[spring-tx-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:176) ~[camel-spring-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:136) ~[camel-spring-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:105) ~[camel-spring-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:114) ~[camel-spring-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) ~[camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) ~[camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.http.common.CamelServlet.doService(CamelServlet.java:208) [camel-http-common-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:78) [camel-http-common-2.21.0.fuse-000112-redhat-1.jar:2.21.0.fuse-000112-redhat-1] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.redhat-1.jar:3.1.0.redhat-1] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.5.13.RELEASE.jar:1.5.13.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:111) [spring-boot-actuator-1.5.13.RELEASE.jar:1.5.13.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) [spring-boot-actuator-1.5.13.RELEASE.jar:1.5.13.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:330) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812) [undertow-core-1.4.18.SP5-redhat-1.jar:1.4.18.SP5-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151] Caused by: javax.transaction.HeuristicMixedException: null at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1297) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1021) ~[spring-tx-4.3.17.RELEASE.jar:4.3.17.RELEASE] ... 78 common frames omitted Suppressed: javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:732) ~[mssql-jdbc-6.4.0.jre8.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerXAResource.prepare(SQLServerXAResource.java:791) ~[mssql-jdbc-6.4.0.jre8.jar:na] at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:214) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2664) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2614) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2157) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1503) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] ... 80 common frames omitted Suppressed: javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:732) ~[mssql-jdbc-6.4.0.jre8.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerXAResource.prepare(SQLServerXAResource.java:791) ~[mssql-jdbc-6.4.0.jre8.jar:na] at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:214) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2664) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2614) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2157) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1503) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] ... 80 common frames omitted Suppressed: javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:732) ~[mssql-jdbc-6.4.0.jre8.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerXAResource.rollback(SQLServerXAResource.java:803) ~[mssql-jdbc-6.4.0.jre8.jar:na] at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:362) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:3023) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:3002) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Abort(BasicAction.java:1981) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1519) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) ~[arjuna-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289) ~[jta-5.5.31.Final-redhat-1.jar:5.5.31.Final-redhat-1] ... 80 common frames omitted
- is related to
-
JBEAP-15922 XA transaction Rollback fails with MSSQL database
- Closed
-
JBTM-3078 JDBC transaction driver does not support MSSQL, the list should be enriched
- Closed