Bonita 7.11 with MS SQL Error SqlExceptionHelper Unable to enlist connection in transaction: enlistResource returns 'false'.

I got an error when install Bonita 7.11 on Windows Server 2019, MS SQL 2016 Cluster

This is the log

2020-09-29 15:10:58.642 +0800 ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper Unable to enlist connection in transaction: enlistResource returns 'false'.
2020-09-29 15:10:58.751 +0800 SEVERE: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita] Exception sending context initialized event to listener instance of class [org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener]
java.lang.RuntimeException: Error while initializing the Engine
        at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:34)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.platform.PlatformNotFoundException: Can't start or stop platform if it is not created.
        at org.bonitasoft.engine.EngineInitializer.initializeEngine(EngineInitializer.java:64)
        at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:32)
        ... 13 more

2020-09-29 15:11:02.501 +0800 WARN: com.arjuna.ats.jta ARJUNA016061: TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_RMERR for < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffac10cb8e:c6c0:5f72dd91:51, node_name=1, branch_uid=0:ffffac10cb8e:c6c0:5f72dd91:92, subordinatenodename=null, eis_name=0 >
javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: Failed to enlist. Error: "Import of Microsoft Distributed Transaction Coordinator (MS DTC) transaction failed: 0x8004d00e(XACT_E_NOTRANSACTION)."
        at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:738)
        at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(SQLServerXAResource.java:772)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:662)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:423)
        at org.apache.tomcat.dbcp.dbcp2.managed.TransactionContext.setSharedConnection(TransactionContext.java:109)
        at org.apache.tomcat.dbcp.dbcp2.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:310)
        at org.apache.tomcat.dbcp.dbcp2.managed.ManagedConnection.<init>(ManagedConnection.java:89)
        at org.apache.tomcat.dbcp.dbcp2.managed.ManagedDataSource.getConnection(ManagedDataSource.java:64)
        at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753)
        at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
        at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:38)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:104)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:134)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:50)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:149)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:176)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:151)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:2104)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2034)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2012)
        at org.hibernate.loader.Loader.doQuery(Loader.java:953)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
        at org.hibernate.loader.Loader.doList(Loader.java:2815)
        at org.hibernate.loader.Loader.doList(Loader.java:2797)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2629)
        at org.hibernate.loader.Loader.list(Loader.java:2624)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:506)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:396)
        at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219)
        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1396)
        at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1558)
        at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1526)
        at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1568)
        at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:342)
        at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:262)
        at org.bonitasoft.engine.platform.impl.PlatformRetrieverImpl.getPlatform(PlatformRetrieverImpl.java:40)
        at org.bonitasoft.engine.platform.impl.PlatformServiceImpl.readPlatform(PlatformServiceImpl.java:330)
        at org.bonitasoft.engine.platform.impl.PlatformServiceImpl.getPlatform(PlatformServiceImpl.java:303)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:490)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:486)
        at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:286)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.getPlatformClassLoader(ServerAPIImpl.java:486)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.beforeInvokeMethodForPlatformSession(ServerAPIImpl.java:241)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.beforeInvokeMethod(ServerAPIImpl.java:188)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:120)
        at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:79)
        at com.sun.proxy.$Proxy78.getClientPlatformConfigurations(Unknown Source)
        at org.bonitasoft.console.common.server.utils.PlatformManagementUtils.retrievePlatformConfiguration(PlatformManagementUtils.java:101)
        at org.bonitasoft.console.common.server.utils.PlatformManagementUtils.initializePlatformConfiguration(PlatformManagementUtils.java:113)
        at org.bonitasoft.console.common.server.servlet.PlatformTenantListener.contextInitialized(PlatformTenantListener.java:52)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

2020-09-29 15:11:02.501 +0800 WARN: com.arjuna.ats.jta ARJUNA016138: Failed to enlist XA resource  XAResourceID:13
javax.transaction.SystemException: TransactionImple.enlistResource - XAResource.start ARJUNA016054: could not register transaction: < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffac10cb8e:c6c0:5f72dd91:51, node_name=1, branch_uid=0:ffffac10cb8e:c6c0:5f72dd91:92, subordinatenodename=null, eis_name=0 >
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:715)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:423)
        at org.apache.tomcat.dbcp.dbcp2.managed.TransactionContext.setSharedConnection(TransactionContext.java:109)
        at org.apache.tomcat.dbcp.dbcp2.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:310)
        at org.apache.tomcat.dbcp.dbcp2.managed.ManagedConnection.<init>(ManagedConnection.java:89)
        at org.apache.tomcat.dbcp.dbcp2.managed.ManagedDataSource.getConnection(ManagedDataSource.java:64)
        at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753)
        at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
        at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:38)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:104)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:134)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:50)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:149)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:176)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:151)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:2104)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2034)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2012)
        at org.hibernate.loader.Loader.doQuery(Loader.java:953)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
        at org.hibernate.loader.Loader.doList(Loader.java:2815)
        at org.hibernate.loader.Loader.doList(Loader.java:2797)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2629)
        at org.hibernate.loader.Loader.list(Loader.java:2624)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:506)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:396)
        at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219)
        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1396)
        at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1558)
        at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1526)
        at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1568)
        at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:342)
        at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:262)
        at org.bonitasoft.engine.platform.impl.PlatformRetrieverImpl.getPlatform(PlatformRetrieverImpl.java:40)
        at org.bonitasoft.engine.platform.impl.PlatformServiceImpl.readPlatform(PlatformServiceImpl.java:330)
        at org.bonitasoft.engine.platform.impl.PlatformServiceImpl.getPlatform(PlatformServiceImpl.java:303)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:490)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:486)
        at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:286)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.getPlatformClassLoader(ServerAPIImpl.java:486)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.beforeInvokeMethodForPlatformSession(ServerAPIImpl.java:241)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.beforeInvokeMethod(ServerAPIImpl.java:188)
        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:120)
        at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:79)
        at com.sun.proxy.$Proxy78.getClientPlatformConfigurations(Unknown Source)
        at org.bonitasoft.console.common.server.utils.PlatformManagementUtils.retrievePlatformConfiguration(PlatformManagementUtils.java:101)
        at org.bonitasoft.console.common.server.utils.PlatformManagementUtils.initializePlatformConfiguration(PlatformManagementUtils.java:113)
        at org.bonitasoft.console.common.server.servlet.PlatformTenantListener.contextInitialized(PlatformTenantListener.java:52)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Please help me if you have experienced

 

Hi

This seems related to your mssql server cluster

https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-xa-transactions?view=sql-server-ver15 provides a java code example that uses XA Transaction and that you could use to test the access to your database outside Bonita. This will let us know if the issue occurs only when running Bonita or with various java applications.

 

For the error you are seeing, you can also have a look at https://blog.sqlauthority.com/2017/08/30/sql-server-error-8509-import-microsoft-distributed-transaction-coordinator-ms-dtc-transaction-failed-0x8004d00exact_e_notransaction/ or https://www.wikitechy.com/errors-and-fixes/sql/error-8509-import-of-microsoft-distributed-transaction-coordinator-transaction-failed-0x8004d00e for insights.

 

Thanks for your information. I'll give it a try.