Persistence error on build


#1

Hi,

I have a process application running on 7.7 Wildfly 10 and sometimes when I try to build it in my IDE it gives me:

Caused by: org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
    Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Deployment.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity.selectDeploymentsByName
### The error occurred while executing a query
### SQL: select * from ACT_RE_DEPLOYMENT D where NAME_=? order by D.DEPLOY_TIME_ desc
### Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
    Caused by: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK"},"WFLYCTL0412: Required services that are not installed:" => ["org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.a4fcc619-42c8-42d0-9b26-7b006107c891"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}

The strange is that sometimes works fine while others I get this error.
Any way to clean up a log or this table? Is it safe to delete some rows in this table?

Thanks!


#2

Hi @kontrag,

Is this the complete stacktrace of the exception?

Best regards,
Yana


#3

Hi @Yana,

Here’s part (exceeded the limit of 32k characters) of the stacktrace:

> 2018-07-10 17:00:16,546 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 1) ARJUNA012108: CheckedAction::check - atomic action 0:ffff839b7b40:-c1798ee:5b44c8a8:28 aborting with 1 threads active!
> 2018-07-10 17:00:16,546 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 1) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 1,5,main] successfully canceled TX 0:ffff839b7b40:-c1798ee:5b44c8a8:28
> 2018-07-10 17:01:08,323 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012113: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] missed interrupt when cancelling TX 0:ffff839b7b40:-c1798ee:5b44c8a8:24 -- exiting as zombie (zombie count decremented to 0)
> 2018-07-10 17:01:08,335 ERROR [org.camunda.bpm.engine.context] (pool-10-thread-1) ENGINE-16004 Exception while closing command context: 
> ### Error querying database.  Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Job.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
> ### The error occurred while executing a query
> ### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine: org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Job.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
> ### The error occurred while executing a query
> ### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
> 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:88)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:168)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:160)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:156)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:145)
> 	at org.camunda.bpm.engine.impl.persistence.entity.JobManager.findNextJobsToExecute(JobManager.java:191)
> 	at org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:54)
> 	at org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:34)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
> 	at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58)
> 	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
> 	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
> 	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.acquireJobs(SequentialJobAcquisitionRunnable.java:142)
> 	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.run(SequentialJobAcquisitionRunnable.java:60)
> 	at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
> 	at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)
> 	at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
> 	at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)
> 	at java.lang.Thread.run(Thread.java:748)
> 	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> 	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)
> 	at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)
> 	at org.apache.ibatis.transaction.managed.ManagedTransaction.openConnection(ManagedTransaction.java:87)
> 	at org.apache.ibatis.transaction.managed.ManagedTransaction.getConnection(ManagedTransaction.java:61)
> 	at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
> 	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
> 	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
> 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
> 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
> 	... 22 more
> Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)
> 	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429)
> 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
> 	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
> 	... 33 more
> Caused by: javax.resource.ResourceException: IJ000652: Unable to obtain lock
> 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getTransactionNewConnection(AbstractPool.java:721)
> 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:598)
> 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:590)
> 	... 36 more
> 
> 2018-07-10 17:01:08,340 WARN  [com.arjuna.ats.arjuna] (pool-10-thread-1) ARJUNA012077: Abort called on already aborted atomic action 0:ffff839b7b40:-c1798ee:5b44c8a8:28
> 2018-07-10 17:01:08,340 ERROR [org.camunda.bpm.engine.jobexecutor] (pool-10-thread-1) ENGINE-14019 Exception during job acquisition Process engine persistence exception: org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
> 	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.rethrow(CommandInvocationContext.java:148)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:173)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
> 	at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58)
> 	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
> 	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
> 	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.acquireJobs(SequentialJobAcquisitionRunnable.java:142)
> 	at org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable.run(SequentialJobAcquisitionRunnable.java:60)
> 	at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
> 	at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)
> 	at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
> 	at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)
> 	at java.lang.Thread.run(Thread.java:748)
> 	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Job.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute
> ### The error occurred while executing a query
> ### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
> 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:88)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:168)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:160)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:156)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:145)
> 	at org.camunda.bpm.engine.impl.persistence.entity.JobManager.findNextJobsToExecute(JobManager.java:191)
> 	at org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:54)
> 	at org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:34)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
> 	... 11 more
> Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> 	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)
> 	at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)
> 	at org.apache.ibatis.transaction.managed.ManagedTransaction.openConnection(ManagedTransaction.java:87)
> 	at org.apache.ibatis.transaction.managed.ManagedTransaction.getConnection(ManagedTransaction.java:61)
> 	at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
> 	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
> 	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
> 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
> 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
> 	... 22 more
> Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine
> 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)
> 	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429)
> 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
> 	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
> 	... 33 more
> Caused by: javax.resource.ResourceException: IJ000652: Unable to obtain lock
> 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getTransactionNewConnection(AbstractPool.java:721)
> 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:598)
> 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:590)
> 	... 36 more
> 
> 2018-07-10 17:01:08,341 ERROR [org.camunda.bpm.engine.context] (ServerService Thread Pool -- 23) ENGINE-16004 Exception while closing command context: 
> ### Error querying database.  Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Deployment.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity.selectDeploymentsByName
> ### The error occurred while executing a query
> ### SQL: select * from ACT_RE_DEPLOYMENT D where NAME_=? order by D.DEPLOY_TIME_ desc
> ### Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK: org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Deployment.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity.selectDeploymentsByName
> ### The error occurred while executing a query
> ### SQL: select * from ACT_RE_DEPLOYMENT D where NAME_=? order by D.DEPLOY_TIME_ desc
> ### Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
> 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:88)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:168)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:160)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:156)
> 	at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.findLatestDeploymentByName(DeploymentManager.java:201)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.getExistingDeployment(DeployCmd.java:486)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:141)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:126)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:473)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.doExecute(DeployCmd.java:126)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:92)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:72)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
> 	at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58)
> 	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
> 	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
> 	at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deployWithResult(RepositoryServiceImpl.java:99)
> 	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deployWithResult(DeploymentBuilderImpl.java:266)
> 	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:262)
> 	at org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl.deploy(ProcessApplicationDeploymentBuilderImpl.java:59)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:174)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:171)
> 	at org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:53)
> 	at org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:45)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService.performDeployment(ProcessApplicationDeploymentService.java:171)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$1.run(ProcessApplicationDeploymentService.java:88)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	at java.lang.Thread.run(Thread.java:748)
> 	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> 	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.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:75)
> 	at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:85)
> 	at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:57)
> 	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:73)
> 	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
> 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
> 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
> 	... 34 more
> 
> 2018-07-10 17:01:08,343 WARN  [com.arjuna.ats.arjuna] (ServerService Thread Pool -- 23) ARJUNA012077: Abort called on already aborted atomic action 0:ffff839b7b40:-c1798ee:5b44c8a8:24
> 2018-07-10 17:01:08,347 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 23) MSC000001: Failed to start service org.camunda.bpm.platform.process-application-module."myproject.war".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-application-module."myproject.war".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d: Could not register process application with shared process engine 
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService.performDeployment(ProcessApplicationDeploymentService.java:185)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$1.run(ProcessApplicationDeploymentService.java:88)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	at java.lang.Thread.run(Thread.java:748)
> 	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
> 	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.rethrow(CommandInvocationContext.java:148)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:173)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
> 	at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:58)
> 	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
> 	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
> 	at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deployWithResult(RepositoryServiceImpl.java:99)
> 	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deployWithResult(DeploymentBuilderImpl.java:266)
> 	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:262)
> 	at org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl.deploy(ProcessApplicationDeploymentBuilderImpl.java:59)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:174)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:171)
> 	at org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:53)
> 	at org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:45)
> 	at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService.performDeployment(ProcessApplicationDeploymentService.java:171)
> 	... 7 more
> Caused by: org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Deployment.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity.selectDeploymentsByName
> ### The error occurred while executing a query
> ### SQL: select * from ACT_RE_DEPLOYMENT D where NAME_=? order by D.DEPLOY_TIME_ desc
> ### Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
> 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:88)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:168)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:160)
> 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:156)
> 	at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.findLatestDeploymentByName(DeploymentManager.java:201)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.getExistingDeployment(DeployCmd.java:486)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:141)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:126)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:473)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.doExecute(DeployCmd.java:126)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:92)
> 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:72)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
> 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
> 	... 19 more
> Caused by: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> 	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.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:75)
> 	at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:85)
> 	at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:57)
> 	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:73)
> 	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
> 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
> 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
> 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
> 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
> 	... 34 more
> 
> 2018-07-10 17:01:08,371 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "myproject.war")]) - failure description: {
>     "WFLYCTL0080: Failed services" => {"org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d" => "org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d: Could not register process application with shared process engine 
>     Caused by: org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
>     Caused by: org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Deployment.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity.selectDeploymentsByName
> ### The error occurred while executing a query
> ### SQL: select * from ACT_RE_DEPLOYMENT D where NAME_=? order by D.DEPLOY_TIME_ desc
> ### Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
>     Caused by: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK"},
>     "WFLYCTL0412: Required services that are not installed:" => ["org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d"],
>     "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
> }
> 2018-07-10 17:01:08,377 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "myproject.war" was rolled back with the following failure message: 
> {
>     "WFLYCTL0080: Failed services" => {"org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d" => "org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d: Could not register process application with shared process engine 
>     Caused by: org.camunda.bpm.engine.ProcessEngineException: Process engine persistence exception
>     Caused by: org.apache.ibatis.exceptions.PersistenceException: 
> ### Error querying database.  Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
> ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Deployment.xml
> ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.DeploymentEntity.selectDeploymentsByName
> ### The error occurred while executing a query
> ### SQL: select * from ACT_RE_DEPLOYMENT D where NAME_=? order by D.DEPLOY_TIME_ desc
> ### Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK
>     Caused by: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK"},
>     "WFLYCTL0412: Required services that are not installed:" => ["org.camunda.bpm.platform.process-application-module.\"myproject.war\".DEPLOY.dab28883-2fcc-441b-b5d9-c19c8cd60f2d"],
>     "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
> }

#4

Hi @kontrag,

Thanks for the trace, it seems to be configuration issue.
Could you please share the datasource configuration and the engine one as well (standalone.xml).

Best regards,
Yana


#5

Hi @Yana,

I haven’t changed the standalone.xml for a long time and so far I had no issues.
Also, as I said, it happens randomly. After a few retries of build, it works fine.

My datasource in standalone.xml is (the default one, hadn’t changed it):

<datasources>
            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                <driver>h2</driver>
                <security>
                    <user-name>sa</user-name>
                    <password>sa</password>
                </security>
            </datasource>
            <datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
                <connection-url>jdbc:h2:./camunda-h2-dbs/process-engine;DB_CLOSE_DELAY=-1;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                <driver>h2</driver>
                <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                <security>
                    <user-name>sa</user-name>
                    <password>sa</password>
                </security>
            </datasource>
            <drivers>
                <driver name="h2" module="com.h2database.h2">
                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                </driver>
            </drivers>
        </datasources>

#6

Hi Team,

Even we are running into similary issue is there any solution provided for this. we are using camunda 7.8.0 running on wildfly10.1.0 and sqlserver 13.0

                <connection-url>jdbc:sqlserver://<IP>:<Port>;databaseName=<DBNAME></connection-url>
                <driver>mssql</driver>
                <security>
                    <user-name><USERNAME></user-name>
                    <password><PWD></password>
                </security>
            </datasource>
            <datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
                <connection-url>jdbc:sqlserver://<IP>:<Port>;databaseName=<DBNAME></connection-url>
                <driver>mssql</driver>
                <security>
                    <user-name><USERNAME></user-name>
                    <password><PWD></password>
                </security>
                <validation>
                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>
                </validation>
            </datasource>
            <drivers>
                <driver name="h2" module="com.h2database.h2">
                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                </driver>
                <driver name="mssql" module="com.microsoft.sqlserver">
                    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                </driver>
            </drivers>

Camunda Server Logs

The error occurred while executing a query

Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine: org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngine

The error may exist in org/camunda/bpm/engine/impl/mapping/entity/ProcessDefinition.xml

The error may involve org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity.selectProcessDefinitionsByQueryCriteria

The error occurred while executing a query

Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/ProcessEngin