I’m using camunda bpm v7.13.0 in a spring boot application with postgres database. I’d like to use a dedicated database schema for camunda, separate from the default schema that application uses.
As recommended in this post, have created the camunda schema and tables manually.
However, process engine fails to initialise with the error:
Engine created. [value-mapper: CompositeValueMapper(List(org.camunda.feel.impl.JavaValueMapper@58486deb)), function-provider: org.camunda.bpm.dmn.feel.impl.scala.function.CustomFunctionTransformer@2b82018, configuration: Configuration(false)]
ENGINE-16004 Exception while closing command context:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ge_property" does not exist
Position: 15
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Property.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ge_property" does not exist
Position: 15
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ge_property" does not exist
Position: 15
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Property.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ge_property" does not exist
Position: 15
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.5.3.jar:3.5.3]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149) ~[mybatis-3.5.3.jar:3.5.3]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.3.jar:3.5.3]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[mybatis-3.5.3.jar:3.5.3]
at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectById(DbSqlSession.java:110) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById(DbEntityManager.java:210) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.persistence.entity.PropertyManager.findPropertyById(PropertyManager.java:29) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.checkStartupLockExists(HistoryLevelSetupCommand.java:107) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:39) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:31) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:46) ~[camunda-engine-spring-7.13.0.jar:7.13.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.1.13.RELEASE.jar:5.1.13.RELEASE]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:44) ~[camunda-engine-spring-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:146) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:108) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:871) ~[camunda-engine-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.spring.SpringTransactionsProcessEngineConfiguration.buildProcessEngine(SpringTransactionsProcessEngineConfiguration.java:63) ~[camunda-engine-spring-7.13.0.jar:7.13.0]
at org.camunda.bpm.engine.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:55) ~[camunda-engine-spring-7.13.0.jar:7.13.0]
at com.sap.fm.workflow.WorkflowConfig.processEngine(WorkflowConfig.java:48) ~[classes/:?]
at com.sap.fm.workflow.WorkflowConfig$$EnhancerBySpringCGLIB$$36072279.CGLIB$processEngine$4(<generated>) ~[classes/:?]
at com.sap.fm.workflow.WorkflowConfig$$EnhancerBySpringCGLIB$$36072279$$FastClassBySpringCGLIB$$8314e6c3.invoke(<generated>) ~[classes/:?]
Here’s the relevant spring boot app configuration:
camunda.bpm.database.schema-update=false
camunda.bpm.database.schema-name=camunda
camunda.bpm.database.table-prefix=camunda.
Without the above changes (camunda tables auto created in default schema), there’s no error and process engine works as expected.
Database version is: PostgreSQL 9.6.14 on x86_64-apple-darwin
Thanks in advance for any insights!