Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-8891

Investigate why batch processing does not work with MariaDB 10.2 and JDBC driver versions >= 1.7.0 or >= 2.1.0

    Details

    • Type: Task
    • Status: Open
    • Priority: L3 - Default
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: engine
    • Labels:
      None

      Description

      Given:

      • MariaDB 10.2 is running
      • A process engine is configured to use that MariaDB 10.2
      • A JDBC driver version >= 1.7.0 (or >= 2.1.0) is used
      • Batch processing is enabled
      • History cleanup is enabled
      • Process engine has been started at least once
      • Process engine is stopped

      When:

      • The process engine is re-started

      Then:

      • Bootstrapping the process engine fails with an OptmisticLockingException
        The required Server component failed to start so Tomcat is unable to start.
        org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
        	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:132)
        	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:483)
        	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:442)
        	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:359)
        	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
        	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
        	at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
        	at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
        	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
        	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.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:131)
        	at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
        	at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:724)
        	at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:34)
        	at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:73)
        	at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:59)
        	at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:112)
        	at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:116)
        	... 16 common frames omitted
        Wrapped by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
        	at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:312)
        	at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:132)
        	at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
        	at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:212)
        	at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:72)
        	at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:57)
        	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
        	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
        	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
        	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        	... 7 common frames omitted
        

      Hint:

      • When history cleanup is disabled, then the engine is bootstrapped without any exception. But the whenever an UPDATE statement is performed an OptimisticLockingException is thrown.
      • MariaDB 10.0 works with all JDBC driver versions and batch processing enabled.
      • MariaDB 10.2 only works with JDBC driver versions < 1.7 or < 2.1
      • The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863

        Issue Links

          Activity

          svetlana.dorokhova Svetlana Dorokhova created issue -
          svetlana.dorokhova Svetlana Dorokhova made changes -
          Field Original Value New Value
          Link This issue is related to CAM-8486 [ CAM-8486 ]
          roman.smirnov Smirnov Roman made changes -
          Summary Check platform restart with MariaDB 10.2 Batch processing does not work with MariaDB 10.2 and db driver version >= 1.7.0 and >= 2.1.0
          roman.smirnov Smirnov Roman made changes -
          Summary Batch processing does not work with MariaDB 10.2 and db driver version >= 1.7.0 and >= 2.1.0 Investigate why batch processing does not work with MariaDB 10.2 and db driver version >= 1.7.0 and >= 2.1.0
          roman.smirnov Smirnov Roman made changes -
          Description The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863

          We should manually test platform restart with MariaDB 10.2 to be sure, that the described behaviour does not appear for us. (Jenkins jobs does not test platform restart)
          *Given:*
          - mariaDB 10.2 is used
          - process Engine is configured to use that MariaDB 10.2
          - a db driver with version >= 1.7.0 (or >= 2.1.0) is used

          - history cleanup is enabled

          - process engine has been started at least once
          - process engine is not running at the moment

          *When:*
          - process engine is re-started

          *Then:*
          - bootstrapping the process engine fails with an {{OptmisticLockingException}}
          {code}
          The required Server component failed to start so Tomcat is unable to start.
          org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:132)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:483)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:442)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:359)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
          at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
          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.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:131)
          at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
          at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:724)
          at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:34)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:73)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:59)
          at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:112)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:116)
          ... 16 common frames omitted
          Wrapped by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:312)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:132)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:212)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:72)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:57)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
          at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          ... 7 common frames omitted
          {code}

          *Hint:*
          - When history cleanup is disabled, then the engine is bootstrapped without any exception. But the whenever an {{UPDATE}} statement is performed an {{OptimisticLockingException}} is thrown.
          - MariaDB 10.0 works
          -



          # With enabled history cleanup
          ## Start


          The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863

          We should manually test platform restart with MariaDB 10.2 to be sure, that the described behaviour does not appear for us. (Jenkins jobs does not test platform restart)
          roman.smirnov Smirnov Roman made changes -
          Summary Investigate why batch processing does not work with MariaDB 10.2 and db driver version >= 1.7.0 and >= 2.1.0 Investigate why batch processing does not work with MariaDB 10.2 and JDBC driver version >= 1.7.0 and >= 2.1.0
          roman.smirnov Smirnov Roman made changes -
          Description *Given:*
          - mariaDB 10.2 is used
          - process Engine is configured to use that MariaDB 10.2
          - a db driver with version >= 1.7.0 (or >= 2.1.0) is used

          - history cleanup is enabled

          - process engine has been started at least once
          - process engine is not running at the moment

          *When:*
          - process engine is re-started

          *Then:*
          - bootstrapping the process engine fails with an {{OptmisticLockingException}}
          {code}
          The required Server component failed to start so Tomcat is unable to start.
          org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:132)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:483)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:442)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:359)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
          at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
          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.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:131)
          at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
          at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:724)
          at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:34)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:73)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:59)
          at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:112)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:116)
          ... 16 common frames omitted
          Wrapped by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:312)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:132)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:212)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:72)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:57)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
          at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          ... 7 common frames omitted
          {code}

          *Hint:*
          - When history cleanup is disabled, then the engine is bootstrapped without any exception. But the whenever an {{UPDATE}} statement is performed an {{OptimisticLockingException}} is thrown.
          - MariaDB 10.0 works
          -



          # With enabled history cleanup
          ## Start


          The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863

          We should manually test platform restart with MariaDB 10.2 to be sure, that the described behaviour does not appear for us. (Jenkins jobs does not test platform restart)
          *Given:*
          - MariaDB 10.2 is running
          - A process engine is configured to use that MariaDB 10.2
          - A JDBC driver version >= 1.7.0 (or >= 2.1.0) is used
          - Batch processing is enabled
          - History cleanup is enabled
          - Process engine has been started at least once
          - Process engine is stopped

          *When:*
          - The process engine is re-started

          *Then:*
          - Bootstrapping the process engine fails with an {{OptmisticLockingException}}
          {code}
          The required Server component failed to start so Tomcat is unable to start.
          org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:132)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:483)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:442)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:359)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
          at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
          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.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:131)
          at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
          at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:724)
          at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:34)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:73)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:59)
          at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:112)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:116)
          ... 16 common frames omitted
          Wrapped by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:312)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:132)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:212)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:72)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:57)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
          at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          ... 7 common frames omitted
          {code}

          *Hint:*
          - When history cleanup is disabled, then the engine is bootstrapped without any exception. But the whenever an {{UPDATE}} statement is performed an {{OptimisticLockingException}} is thrown.
          - MariaDB 10.0 works with all JDBC driver versions and batch processing enabled.
          - MariaDB 10.2 only works with JDBC driver versions < 1.7 or < 2.1
          -



          # With enabled history cleanup
          ## Start


          The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863

          We should manually test platform restart with MariaDB 10.2 to be sure, that the described behaviour does not appear for us. (Jenkins jobs does not test platform restart)
          roman.smirnov Smirnov Roman made changes -
          Summary Investigate why batch processing does not work with MariaDB 10.2 and JDBC driver version >= 1.7.0 and >= 2.1.0 Investigate why batch processing does not work with MariaDB 10.2 and JDBC driver versions >= 1.7.0 and >= 2.1.0
          roman.smirnov Smirnov Roman made changes -
          Summary Investigate why batch processing does not work with MariaDB 10.2 and JDBC driver versions >= 1.7.0 and >= 2.1.0 Investigate why batch processing does not work with MariaDB 10.2 and JDBC driver versions >= 1.7.0 or >= 2.1.0
          roman.smirnov Smirnov Roman made changes -
          Description *Given:*
          - MariaDB 10.2 is running
          - A process engine is configured to use that MariaDB 10.2
          - A JDBC driver version >= 1.7.0 (or >= 2.1.0) is used
          - Batch processing is enabled
          - History cleanup is enabled
          - Process engine has been started at least once
          - Process engine is stopped

          *When:*
          - The process engine is re-started

          *Then:*
          - Bootstrapping the process engine fails with an {{OptmisticLockingException}}
          {code}
          The required Server component failed to start so Tomcat is unable to start.
          org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:132)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:483)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:442)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:359)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
          at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
          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.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:131)
          at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
          at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:724)
          at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:34)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:73)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:59)
          at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:112)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:116)
          ... 16 common frames omitted
          Wrapped by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:312)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:132)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:212)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:72)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:57)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
          at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          ... 7 common frames omitted
          {code}

          *Hint:*
          - When history cleanup is disabled, then the engine is bootstrapped without any exception. But the whenever an {{UPDATE}} statement is performed an {{OptimisticLockingException}} is thrown.
          - MariaDB 10.0 works with all JDBC driver versions and batch processing enabled.
          - MariaDB 10.2 only works with JDBC driver versions < 1.7 or < 2.1
          -



          # With enabled history cleanup
          ## Start


          The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863

          We should manually test platform restart with MariaDB 10.2 to be sure, that the described behaviour does not appear for us. (Jenkins jobs does not test platform restart)
          *Given:*
          - MariaDB 10.2 is running
          - A process engine is configured to use that MariaDB 10.2
          - A JDBC driver version >= 1.7.0 (or >= 2.1.0) is used
          - Batch processing is enabled
          - History cleanup is enabled
          - Process engine has been started at least once
          - Process engine is stopped

          *When:*
          - The process engine is re-started

          *Then:*
          - Bootstrapping the process engine fails with an {{OptmisticLockingException}}
          {code}
          The required Server component failed to start so Tomcat is unable to start.
          org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:132)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:483)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:442)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:359)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
          at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
          at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
          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.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:131)
          at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
          at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:724)
          at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:34)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:73)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:59)
          at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:112)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:116)
          ... 16 common frames omitted
          Wrapped by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[b2d4680a-2d23-11e8-8147-803220524153]' failed. Entity was updated by another transaction concurrently.
          at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:312)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:132)
          at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
          at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:212)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:72)
          at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:57)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
          at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          ... 7 common frames omitted
          {code}

          *Hint:*
          - When history cleanup is disabled, then the engine is bootstrapped without any exception. But the whenever an {{UPDATE}} statement is performed an {{OptimisticLockingException}} is thrown.
          - MariaDB 10.0 works with all JDBC driver versions and batch processing enabled.
          - MariaDB 10.2 only works with JDBC driver versions < 1.7 or < 2.1
          - The task is related with this forum post: https://forum.camunda.org/t/new-installation-of-camunda-fails-to-start-on-second-try/5863
          roman.smirnov Smirnov Roman made changes -
          Remote Link This issue links to "Page (camunda confluence)" [ 12035 ]
          roman.smirnov Smirnov Roman made changes -
          Remote Link This issue links to "Page (camunda confluence)" [ 12035 ]
          roman.smirnov Smirnov Roman made changes -
          Link This issue is duplicated by CAM-9169 [ CAM-9169 ]
          thorben.lindhauer Thorben Lindhauer made changes -
          Workflow camunda BPM [ 48273 ] Backup_camunda BPM [ 56442 ]

            People

            • Assignee:
              svetlana.dorokhova Svetlana Dorokhova
              Reporter:
              svetlana.dorokhova Svetlana Dorokhova
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:

                Development