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

Missing database transaction during ProcessEngine creation

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Cannot Reproduce
    • L3 - Default
    • None
    • 7.8.0
    • engine
    • None

    Description

      Since merging the changes of camunda master into my fork during last weekend I get an exception when starting Wildfly10 including the Camunda module with an empty database.
      The schema get's created successfully but then I get this error message:

      ### Error updating database.  Cause: java.sql.SQLException: Not in transaction.
      ### The error may involve defaultParameterMap
      ### The error occurred while setting parameters
      ### SQL: SELECT * FROM ACT_GE_PROPERTY WHERE NAME_ = 'startup.lock' for update
      ### Cause: java.sql.SQLException: Not in transaction.: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error updating database.  Cause: java.sql.SQLException: Not in transaction.
      ### The error may involve defaultParameterMap
      ### The error occurred while setting parameters
      ### SQL: SELECT * FROM ACT_GE_PROPERTY WHERE NAME_ = 'startup.lock' for update
      ### Cause: java.sql.SQLException: Not in transaction.
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200)
      	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.lock(DbSqlSession.java:121)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.lock(DbEntityManager.java:263)
      	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.lock(DbEntityManager.java:259)
      	at org.camunda.bpm.engine.impl.persistence.entity.PropertyManager.acquireExclusiveLockForStartup(PropertyManager.java:43)
      	at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:44)
      	at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:27)
      	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.LogInterceptor.execute(LogInterceptor.java:30)
      	at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:132)
      	at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:98)
      	at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:722)
      	at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startProcessEngine(MscManagedProcessEngineController.java:177)
      	at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:131)
      	at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:129)
      	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.MscManagedProcessEngineController.startInternal(MscManagedProcessEngineController.java:129)
      	at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:90)
      	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: Not in transaction.
      	at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
      	at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3178)
      	at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3458)
      	at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2369)
      	at com.informix.jdbcx.IfxXASqli.receiveMessage(IfxXASqli.java:101)
      	at com.informix.jdbc.IfxSqli.sendStatementQuery(IfxSqli.java:1588)
      	at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2220)
      	at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2175)
      	at com.informix.jdbc.IfxResultSet.executeExecute(IfxResultSet.java:364)
      	at com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1155)
      	at com.informix.jdbc.IfxPreparedStatement.execute(IfxPreparedStatement.java:414)
      	at com.informix.jdbc.IfxPreparedStatement.execute(IfxPreparedStatement.java:400)
      	at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:303)
      	at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:442)
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
      	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
      	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
      	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
      	... 25 more
      Caused by: java.sql.SQLException
      	at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
      	at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3463)
      	... 42 more
      
      

      Acquiring the entry in ACT_GE_PROPERTY for update needs a transaction.
      Acquiring the lock is done to prepare the insert of the historyLevel full = 3 into ACT_GE_PROPERTY.
      After shutdown of Wildfly and inserting the row into the table directly the follwoing startup is without any problem.

      This has been working fine before, can't say exactly since when the problem ist there.
      Not yet verfied, but I'm quite sure, that this problem was introduced with the changes in https://github.com/camunda/camunda-bpm-platform/commit/1d1e372224c07ac9c6b6823c6bba40c45ccfd93b.

      Running clean & install works fine, so this situation seems not be covered by any testcase.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              yana.vasileva Yana Vasileva
              langfr Frank Langelage
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce