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

Allow empty deployment names with duplicate filtering enabled on all supported databases

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • L3 - Default
    • 7.18.0, 7.18.0-alpha1
    • 7.18.0
    • engine
    • None

    Description

      Acceptance Criteria (Required on creation):

      • Creating deployments without names with enabled duplicate filtering works on all supported databases

      Hints (optional):

      • Our CI fails for duplicate filtering tests on deployments without names on Oracle databases (at least)
        [2022-04-27T09:16:01.415Z] [ERROR] shouldLogWarningForDuplicateFilteringWithoutName(org.camunda.bpm.engine.test.bpmn.deployment.BpmnDeploymentTest)  Time elapsed: 0.026 s  <<< ERROR!
        
        [2022-04-27T09:16:01.415Z] org.camunda.bpm.engine.ProcessEngineException: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.util.ExceptionUtil.wrapPersistenceException(ExceptionUtil.java:263)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.util.ExceptionUtil.doWithExceptionWrapper(ExceptionUtil.java:257)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.executeSelectList(DbSqlSession.java:111)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:103)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectListWithRawParameter(DbEntityManager.java:182)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:174)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:170)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectList(DbEntityManager.java:154)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.persistence.entity.ResourceManager.findLatestResourcesByDeploymentName(ResourceManager.java:84)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.resolveResourcesToDeploy(DeployCmd.java:224)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.lambda$doExecute$0(DeployCmd.java:145)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:559)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:547)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.doExecute(DeployCmd.java:141)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:101)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:81)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deployWithResult(RepositoryServiceImpl.java:104)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deployWithResult(DeploymentBuilderImpl.java:270)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.test.util.ProcessEngineTestRule.deploy(ProcessEngineTestRule.java:126)
        
        [2022-04-27T09:16:01.415Z] 	at org.camunda.bpm.engine.test.bpmn.deployment.BpmnDeploymentTest.shouldLogWarningForDuplicateFilteringWithoutName(BpmnDeploymentTest.java:168)
        
        [2022-04-27T09:16:01.415Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
        [2022-04-27T09:16:01.415Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        
        [2022-04-27T09:16:01.415Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        
        [2022-04-27T09:16:01.415Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        
        [2022-04-27T09:16:01.415Z] 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
        
        [2022-04-27T09:16:01.416Z] 	at org.camunda.bpm.engine.test.ProcessEngineRule$1.evaluate(ProcessEngineRule.java:185)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        
        [2022-04-27T09:16:01.416Z] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
        
        [2022-04-27T09:16:01.416Z] Caused by: org.apache.ibatis.exceptions.PersistenceException: 
        
        [2022-04-27T09:16:01.416Z] ### Error querying database.  Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='parameter.deploymentName', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: Invalid column type: 1111
        
        [2022-04-27T09:16:01.416Z] ### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Resource.xml
        
        [2022-04-27T09:16:01.416Z] ### The error may involve org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity.selectLatestResourcesByDeploymentName-Inline
        
        [2022-04-27T09:16:01.416Z] ### The error occurred while setting parameters
        
        [2022-04-27T09:16:01.416Z] ### 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                     (D.SOURCE_ is null or                     D.SOURCE_ = ?                     )                           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_ = ?     and             (D.SOURCE_ is null or             D.SOURCE_ = ?             )                         and D.TENANT_ID_ is null           order by B.ID_ asc
        
        [2022-04-27T09:16:01.416Z] ### Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='parameter.deploymentName', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: Invalid column type: 1111
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
        
        [2022-04-27T09:16:01.416Z] 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
        
        [2022-04-27T09:16:01.417Z] 	at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.lambda$executeSelectList$1(DbSqlSession.java:111)
        
        [2022-04-27T09:16:01.417Z] 	at org.camunda.bpm.engine.impl.util.ExceptionUtil.doWithExceptionWrapper(ExceptionUtil.java:254)
        
        [2022-04-27T09:16:01.417Z] 	... 58 more
        
        [2022-04-27T09:16:01.417Z] Caused by: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='parameter.deploymentName', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: Invalid column type: 1111
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:89)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:94)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:64)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.BatchExecutor.doQuery(BatchExecutor.java:91)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
        
        [2022-04-27T09:16:01.417Z] 	... 61 more
        
        [2022-04-27T09:16:01.417Z] Caused by: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: Invalid column type: 1111
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:67)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:87)
        
        [2022-04-27T09:16:01.417Z] 	... 69 more
        
        [2022-04-27T09:16:01.417Z] Caused by: java.sql.SQLException: Invalid column type: 1111
        
        [2022-04-27T09:16:01.417Z] 	at oracle.jdbc.driver.OracleStatement.getInternalType(OracleStatement.java:4369)
        
        [2022-04-27T09:16:01.417Z] 	at oracle.jdbc.driver.OraclePreparedStatement.setNullCritical(OraclePreparedStatement.java:5836)
        
        [2022-04-27T09:16:01.417Z] 	at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:5818)
        
        [2022-04-27T09:16:01.417Z] 	at oracle.jdbc.driver.OraclePreparedStatementWrapper.setNull(OraclePreparedStatementWrapper.java:1292)
        
        [2022-04-27T09:16:01.417Z] 	at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:65)
        
        [2022-04-27T09:16:01.417Z] 	... 70 more
        
      • MyBatis cannot handle the JDBC type properly for null values on its own, we need to add a type declaration to the "deploymentName" parameter in Resource.xml#resourcesFromLastDeploymentWithName

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                tobias.metzke Tobias Metzke-Bernstein
                Tobias Metzke-Bernstein Tobias Metzke-Bernstein
                Nikola Koevski Nikola Koevski
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce