Could not execute DELETE TimerEntity. Entity was updated by another transaction concurrently.

617 views
Skip to first unread message

Emerald Hieu

unread,
Dec 15, 2014, 12:09:30 AM12/15/14
to camunda-...@googlegroups.com
Hi developers,

My app uses Timer Start Event to do some business. I get these errors after restarting JBoss server. I don't have a clue why this error happens. The errors have gone after restarting server 2 times.

Camunda 7.2 JBoss.


Deployment does not provide any case definitions.
11:54:45,091 WARN  [com.arjuna.ats.jta] (ServerService Thread Pool -- 79) ARJUNA016029: SynchronizationImple.afterCompletion - failed for org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization@7817056d with exception: java.lang.NullPointerException
at org.camunda.bpm.engine.impl.cmd.UnregisterDeploymentCmd.execute(UnregisterDeploymentCmd.java:39) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentFailListener.execute(DeploymentFailListener.java:35) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization.afterCompletion(JtaTransactionContext.java:103) [camunda-engine-7.2.0.jar:7.2.0]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:334)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:120)
at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1247)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:143)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.doRollback(JtaTransactionInterceptor.java:143) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:62) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:82) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:125) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl.deploy(ProcessApplicationDeploymentBuilderImpl.java:51) [camunda-engine-7.2.0.jar:7.2.0]
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:167)
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:164)
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:164)
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$1.run(ProcessApplicationDeploymentService.java:87)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)

11:54:45,130 WARN  [com.arjuna.ats.arjuna] (ServerService Thread Pool -- 79) ARJUNA012127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffff0a0401e2:46f7332d:548e6958:6a, org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization@7817056d >
11:54:45,131 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 79) MSC00001: Failed to start service org.camunda.bpm.platform.process-application-module."my-app.war".DEPLOY.employeeRegistration: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-application-module."my-app.war".DEPLOY.employeeRegistration: Could not register process application with shared process engine 
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService.performDeployment(ProcessApplicationDeploymentService.java:178)
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$1.run(ProcessApplicationDeploymentService.java:87)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.camunda.bpm.engine.OptimisticLockingException: Could not execute DELETE TimerEntity[3f75d075-8416-11e4-9b05-929f20524153]. Entity was updated by another transaction concurrently
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:287)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:267)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:258)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:187)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:106)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:82)
at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:125)
at org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl.deploy(ProcessApplicationDeploymentBuilderImpl.java:51)
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:167)
at org.camunda.bpm.container.impl.jboss.service.ProcessApplicationDeploymentService$3.run(ProcessApplicationDeploymentService.java:164)
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:164)
... 8 more


Regards,
Emerald Hieu

Roman Smirnov

unread,
Dec 17, 2014, 4:32:24 AM12/17/14
to camunda-...@googlegroups.com
Hi Emerald,

Have you observed the behavior a few times or it has occured only once? Could you narrow the problem, so that we would be able to reproduce it?

Cheers,
Roman

mireill...@gmail.com

unread,
Oct 26, 2015, 8:34:26 AM10/26/15
to camunda BPM users
Hallo everyone,

I am getting the same error as Emerald and I am using Camunda 7.2 JBoss.

In fact, I have a process A which has a timer every 30 sec and reads from a queue table in the database. Process A has also a sub-process B which make some updates of the database. Once the updates are successful, process B is finished and process A should delete the tuple from the queue. The deletion is throwing the following exception:

2015-10-16 17:07:33,463 SEVERE [job-executor-tp-threads - 10] - Error while closing command context: java.lang.NullPointerException
at org.camunda.bpm.engine.impl.cmd.FoxJobRetryCmd.getCurrentActivity(FoxJobRetryCmd.java:101)
at org.camunda.bpm.engine.impl.cmd.FoxJobRetryCmd.execute(FoxJobRetryCmd.java:46)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:97)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.FailedJobListener.execute(FailedJobListener.java:52)
at org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization.afterCompletion(JtaTransactionContext.java:103)
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:334)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:120)
at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1247)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:143)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.doRollback(JtaTransactionInterceptor.java:143)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:62)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:79)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:67)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:826)
at java.lang.Thread.run(Unknown Source)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)

2015-10-16 17:07:33,495 WARN [job-executor-tp-threads - 10] - ARJUNA016029: SynchronizationImple.afterCompletion - failed for org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization@23fb8849 with exception: java.lang.NullPointerException
at org.camunda.bpm.engine.impl.cmd.FoxJobRetryCmd.getCurrentActivity(FoxJobRetryCmd.java:101)
at org.camunda.bpm.engine.impl.cmd.FoxJobRetryCmd.execute(FoxJobRetryCmd.java:46)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:97)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.FailedJobListener.execute(FailedJobListener.java:52)
at org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization.afterCompletion(JtaTransactionContext.java:103)
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:334)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:120)
at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1247)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:143)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.doRollback(JtaTransactionInterceptor.java:143)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:62)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:79)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:67)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:826)
at java.lang.Thread.run(Unknown Source)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)

2015-10-16 17:07:33,510 WARN [job-executor-tp-threads - 10] - ARJUNA012127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffff0a0a69d4:-5d5743c7:56210fc9:11a, org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization@23fb8849 >
2015-10-16 17:07:33,510 WARNING [job-executor-tp-threads - 10] - Exception while executing job with id 6f3a43c6-7416-11e5-bbe6-000c2953c1d7: org.camunda.bpm.engine.OptimisticLockingException: Could not execute DELETE TimerEntity[6f3a43c6-7416-11e5-bbe6-000c2953c1d7]. Entity was updated by another transaction concurrently
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:287)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:267)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:258)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:187)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:106)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:79)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:67)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:826)
at java.lang.Thread.run(Unknown Source)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)

Can someone help me to solve this issue?

Thank you in adavance

Mireilla

thorben....@camunda.com

unread,
Oct 27, 2015, 5:18:27 AM10/27/15
to camunda BPM users, mireill...@gmail.com
Hi Mireilla,

Could please post a simplified project that reproduces the problem?

Thanks,
Thorben
Reply all
Reply to author
Forward
0 new messages