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

Upgrade support for h2 database to 1.4.x

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.7.0
    • Component/s: engine
    • Labels:
      None

      Description

      AT:

      • all tests use h2 database 1.4.x
      • supported environments are updated
      • Remove the ignore condition for H2 database in "org/camunda/bpm/qa/upgrade/authorization/AuthorizationTest.java" after upgrade

      Motivation:

      • there is a bug in H2 1.3 such that some authorization checks seem to not work (e.g. failed tests org/camunda/bpm/qa/upgrade/authorization/AuthorizationTest.java in the instance migration test suite)
      • there seem to be issues with H2 1.3 and parallel access that appear to be in the new storage engine 1.4 uses

        Issue Links

          Activity

          Hide
          meyer Daniel Meyer added a comment -

          Hint:

          there seems to be an incompatibility:

          10:49:00.711 [main] DEBUG
          o.c.b.e.i.p.e.R.selectLatestResourcesByDeploymentName - ==> Preparing:
          select B.* from ACT_GE_BYTEARRAY B inner join (select B.NAME_,
          MAX(D.DEPLOY_TIME_) DEPLOY_TIME_ from ACT_GE_BYTEARRAY B inner join
          ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ = D.ID_ where D.NAME_ = ? and
          B.NAME_ in ( ? ) group by B.NAME_) LAST_RESOURCE on B.NAME_ =
          LAST_RESOURCE.NAME_ inner join ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ =
          D.ID_ and D.DEPLOY_TIME_ = LAST_RESOURCE.DEPLOY_TIME_ and D.NAME_ = ?

          Jan 14, 2015 10:49:00 AM
          org.camunda.bpm.engine.impl.interceptor.CommandContext close

          SCHWERWIEGEND: Error while closing command context

          _

          org.apache.ibatis.exceptions.PersistenceException

          _:

              1. Error querying database. Cause:

          org.h2.jdbc.JdbcSQLException: Allgemeiner Fehler:
          "java.lang.RuntimeException: Unexpected code path"

          General error: "

          java.lang.RuntimeException: Unexpected code path" [50000-184]

              1. The error may exist in
                org/camunda/bpm/engine/impl/mapping/entity/Resource.xml
              1. The error may involve
                org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity.selectLatestResourcesByDeploymentName
              1. The error occurred while executing a query
              1. SQL: select B.* from ACT_GE_BYTEARRAY B inner join (select B.NAME_,
                MAX(D.DEPLOY_TIME_) DEPLOY_TIME_ from ACT_GE_BYTEARRAY B inner join
                ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ = D.ID_ where D.NAME_ = ? and
                B.NAME_ in ( ? ) group by B.NAME_) LAST_RESOURCE on B.NAME_ =
                LAST_RESOURCE.NAME_ inner join ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ =
                D.ID_ and D.DEPLOY_TIME_ = LAST_RESOURCE.DEPLOY_TIME_ and D.NAME_ = ?
              1. Cause:

          org.h2.jdbc.JdbcSQLException: Allgemeiner Fehler:
          "java.lang.RuntimeException: Unexpected code path"

          General error: "

          java.lang.RuntimeException: Unexpected code path" [50000-184]

          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:86)

          at
          org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(

          DbEntityManager.java:163)

          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(

          DbEntityManager.java:155)

          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(

          DbEntityManager.java:151)

          at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(

          DbEntityManager.java:135)

          at
          org.camunda.bpm.engine.impl.persistence.entity.ResourceManager.findLatestResourcesByDeploymentName(

          ResourceManager.java:62)

          at org.camunda.bpm.engine.impl.cmd.DeployCmd.resolveResourcesToDeploy(

          DeployCmd.java:128)

          at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(

          DeployCmd.java:77)

          at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(

          DeployCmd.java:61)

          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.spring.SpringTransactionInterceptor$1.doInTransaction(

          SpringTransactionInterceptor.java:42)

          at org.springframework.transaction.support.TransactionTemplate.execute(

          TransactionTemplate.java:133)

          at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(

          SpringTransactionInterceptor.java:40)

          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.spring.SpringProcessEngineConfiguration.autoDeployResources(

          SpringProcessEngineConfiguration.java:143)

          at
          org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration.buildProcessEngine(

          SpringProcessEngineConfiguration.java:62)

          at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(

          ProcessEngineFactoryBean.java:51)

          at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(

          ProcessEngineFactoryBean.java:31)

          at
          org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(

          FactoryBeanRegistrySupport.java:168)

          at
          org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(

          FactoryBeanRegistrySupport.java:103)

          at
          org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(

          AbstractBeanFactory.java:1506)

          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(

          AbstractBeanFactory.java:250)

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(

          AbstractBeanFactory.java:193)

          at
          org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(

          DefaultListableBeanFactory.java:1127)

          at
          org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(

          DefaultListableBeanFactory.java:1051)

          at
          org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(

          DefaultListableBeanFactory.java:949)

          at
          org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(

          ConstructorResolver.java:816)

          at

          Show
          meyer Daniel Meyer added a comment - Hint: there seems to be an incompatibility: 10:49:00.711 [main] DEBUG o.c.b.e.i.p.e.R.selectLatestResourcesByDeploymentName - ==> Preparing: select B.* from ACT_GE_BYTEARRAY B inner join (select B.NAME_, MAX(D.DEPLOY_TIME_) DEPLOY_TIME_ from ACT_GE_BYTEARRAY B inner join ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ = D.ID_ where D.NAME_ = ? and B.NAME_ in ( ? ) group by B.NAME_) LAST_RESOURCE on B.NAME_ = LAST_RESOURCE.NAME_ inner join ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ = D.ID_ and D.DEPLOY_TIME_ = LAST_RESOURCE.DEPLOY_TIME_ and D.NAME_ = ? Jan 14, 2015 10:49:00 AM org.camunda.bpm.engine.impl.interceptor.CommandContext close SCHWERWIEGEND: Error while closing command context _ org.apache.ibatis.exceptions.PersistenceException _: Error querying database. Cause: org.h2.jdbc.JdbcSQLException : Allgemeiner Fehler: " java.lang.RuntimeException : Unexpected code path" General error: " java.lang.RuntimeException : Unexpected code path" [50000-184] The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Resource.xml The error may involve org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity.selectLatestResourcesByDeploymentName The error occurred while executing a query SQL: select B.* from ACT_GE_BYTEARRAY B inner join (select B.NAME_, MAX(D.DEPLOY_TIME_) DEPLOY_TIME_ from ACT_GE_BYTEARRAY B inner join ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ = D.ID_ where D.NAME_ = ? and B.NAME_ in ( ? ) group by B.NAME_) LAST_RESOURCE on B.NAME_ = LAST_RESOURCE.NAME_ inner join ACT_RE_DEPLOYMENT D on B.DEPLOYMENT_ID_ = D.ID_ and D.DEPLOY_TIME_ = LAST_RESOURCE.DEPLOY_TIME_ and D.NAME_ = ? Cause: org.h2.jdbc.JdbcSQLException : Allgemeiner Fehler: " java.lang.RuntimeException : Unexpected code path" General error: " java.lang.RuntimeException : Unexpected code path" [50000-184] 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:86 ) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter( DbEntityManager.java:163 ) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList( DbEntityManager.java:155 ) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList( DbEntityManager.java:151 ) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList( DbEntityManager.java:135 ) at org.camunda.bpm.engine.impl.persistence.entity.ResourceManager.findLatestResourcesByDeploymentName( ResourceManager.java:62 ) at org.camunda.bpm.engine.impl.cmd.DeployCmd.resolveResourcesToDeploy( DeployCmd.java:128 ) at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute( DeployCmd.java:77 ) at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute( DeployCmd.java:61 ) 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.spring.SpringTransactionInterceptor$1.doInTransaction( SpringTransactionInterceptor.java:42 ) at org.springframework.transaction.support.TransactionTemplate.execute( TransactionTemplate.java:133 ) at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute( SpringTransactionInterceptor.java:40 ) 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.spring.SpringProcessEngineConfiguration.autoDeployResources( SpringProcessEngineConfiguration.java:143 ) at org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration.buildProcessEngine( SpringProcessEngineConfiguration.java:62 ) at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject( ProcessEngineFactoryBean.java:51 ) at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject( ProcessEngineFactoryBean.java:31 ) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean( FactoryBeanRegistrySupport.java:168 ) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean( FactoryBeanRegistrySupport.java:103 ) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance( AbstractBeanFactory.java:1506 ) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:250 ) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean( AbstractBeanFactory.java:193 ) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates( DefaultListableBeanFactory.java:1127 ) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency( DefaultListableBeanFactory.java:1051 ) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency( DefaultListableBeanFactory.java:949 ) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument( ConstructorResolver.java:816 ) at
          Hide
          lipphardt Christian Lipphardt added a comment -

          Works without any problems using 1.4.187 (engine unit and engine-IT tomcat).
          What version did you use?

          Show
          lipphardt Christian Lipphardt added a comment - Works without any problems using 1.4.187 (engine unit and engine-IT tomcat). What version did you use?
          Hide
          garysamuelson Gary Samuelson added a comment -

          Setup and ran initial tests on Wildfly platform using the new h2-1.4.193.jar.

          Haven't pushed these changes yet - tentatively, here's the list:

          1) update jar to: h2-1.4.193.jar
          2) Update the h2 module:

          <module xmlns="urn:jboss:module:1.3" name="com.h2database.h2">
          
              <resources>
                  <resource-root path="h2-1.4.193.jar"/>
              </resources>
              <dependencies>
                  <module name="javax.api"/>
                  <module name="javax.transaction.api"/>
                  <module name="javax.servlet.api" optional="true"/>
              </dependencies>
          </module>
          
          Show
          garysamuelson Gary Samuelson added a comment - Setup and ran initial tests on Wildfly platform using the new h2-1.4.193.jar. Haven't pushed these changes yet - tentatively, here's the list: 1) update jar to: h2-1.4.193.jar 2) Update the h2 module: <module xmlns= "urn:jboss:module:1.3" name= "com.h2database.h2" > <resources> <resource-root path= "h2-1.4.193.jar" /> </resources> <dependencies> <module name= "javax.api" /> <module name= "javax.transaction.api" /> <module name= "javax.servlet.api" optional= "true" /> </dependencies> </module>
          Hide
          garysamuelson Gary Samuelson added a comment -

          Important addition to above note -

          The h2 file name will change.
          OLD: process-engine.h2.db
          NEW: process-engine.mv.db

          Show
          garysamuelson Gary Samuelson added a comment - Important addition to above note - The h2 file name will change. OLD: process-engine.h2.db NEW: process-engine.mv.db
          Hide
          svetlana.dorokhova Svetlana Dorokhova added a comment - - edited

          The version 1.4.190 was chosen as it is the latest supporting JDK 6.

          Show
          svetlana.dorokhova Svetlana Dorokhova added a comment - - edited The version 1.4.190 was chosen as it is the latest supporting JDK 6.

            People

            • Assignee:
              svetlana.dorokhova Svetlana Dorokhova
              Reporter:
              meyer Daniel Meyer
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development