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

Upgrade support for h2 database to 1.4.x

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.7.0
    • None
    • engine
    • None

      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

        This is the controller panel for Smart Panels app

            [CAM-3311] Upgrade support for h2 database to 1.4.x

            Daniel Meyer created issue -
            Daniel Meyer made changes -
            Assignee New: Maintenance [ maintenance@camunda.com ]
            Daniel Meyer made changes -
            Description Original: AT:
            - h2 database 1.4.x is supported.
            New: AT:
            - h2 database 1.4.x is supported

            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

            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
            Daniel Meyer made changes -
            Description Original: AT:
            - h2 database 1.4.x is supported
            New: AT:
            - all tests use h2 database 1.4.x
            - supported environments are updated

            Christian added a comment -

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

            Christian added a comment - Works without any problems using 1.4.187 (engine unit and engine-IT tomcat). What version did you use?
            Christian made changes -
            Link New: This issue is related to CAM-6044 [ CAM-6044 ]
            Thorben Lindhauer made changes -
            Description Original: AT:
            - all tests use h2 database 1.4.x
            - supported environments are updated
            New: 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
            Thorben Lindhauer made changes -
            Fix Version/s New: 7.6.0 [ 14490 ]
            Thorben Lindhauer made changes -
            Issue Type Original: Task [ 3 ] New: Feature Request [ 2 ]

              svetlana.dorokhova Svetlana Dorokhova
              meyer Daniel Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: