Details
-
Feature Request
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
None
-
None
Description
- When using the process engine's databaseSchemaUpdate property such that it creates the table and setting to databaseTablePrefix to a non-empty value, then the create script should respect this value
Context:
I'm using camunda on spring boot (v3.3.1) and when configured to create-drop the DB schema, it ignores the table-prefix configuration although the queries are including the configured prefix which results on errors.
My spring's config:
spring: datasource: url: jdbc:postgresql://localhost:5432/camunda username: postgres password: driver-class-name: org.postgresql.Driver camunda.bpm: admin-user: id: kermit password: firstName: Kermit filter: create: All tasks database: type: postgres table-prefix: camunda schema-update: create-drop
And I checked the scripts on
https://github.com/camunda/camunda-bpm-platform/tree/master/engine/src/main/resources/org/camunda/bpm/engine/db they don't have any table-prefix variable. When the application starts the following exception occurs:
Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "camundaact_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 camundaACT_GE_PROPERTY where NAME_ = ? ### Cause: org.postgresql.util.PSQLException: ERROR: relation "camundaact_ge_property" does not exist Position: 15 at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77) ~[mybatis-3.4.4.jar:3.4.4] at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectById(DbSqlSession.java:110) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectById(DbEntityManager.java:213) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.persistence.entity.PropertyManager.findPropertyById(PropertyManager.java:29) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.checkStartupLockExists(HistoryLevelSetupCommand.java:107) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:39) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:31) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.11.0.jar:7.11.0] at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:107) ~[camunda-engine-7.11.0.jar:7.11.0] ... 77 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: relation "camundaact_ge_property" does not exist Position: 15 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2468) ~[postgresql-42.2.6.jar:42.2.6] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2211) ~[postgresql-42.2.6.jar:42.2.6] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:309) ~[postgresql-42.2.6.jar:42.2.6] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446) ~[postgresql-42.2.6.jar:42.2.6] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370) ~[postgresql-42.2.6.jar:42.2.6] at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149) ~[postgresql-42.2.6.jar:42.2.6] at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:138) ~[postgresql-42.2.6.jar:42.2.6] at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-3.2.0.jar:na] at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-3.2.0.jar:na] at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.executor.BatchExecutor.doQuery(BatchExecutor.java:93) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) ~[mybatis-3.4.4.jar:3.4.4] at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ~[mybatis-3.4.4.jar:3.4.4] ... 87 common frames omitted
The workaround was to remove table-prefix config.
mgm-controller-panel
This is the controller panel for Smart Panels app
Attachments
Issue Links
- duplicates
-
CAM-13714 Database schema creation respects custom schema or table prefix
- Closed