Disable auto-creation of tables during bootstrap (org.camunda.bpm.engine.ProcessEngineException: ENGINE-03056)

Hi [gianluca1606]
Setting spring.jpa.hibernate.ddl-auto=NONE will change the JPA behaviour generally, right? This is not what I want to achieve.

I debugged the application and played around with the configuration. It seems that there is a problem when you use H2 with the provided H2-scripts and set the database schema to false to manually run the H2-scripts.
The scripts are executed successfully as the console shows
image

But when the internal check from Camunda-class “DbSqlSession” drops in the class throws exception
image

This is the position where the check s done
image

This is caused by
image

So it seems that during bootstrapping the class can’t find the specified tables since it is searching on the wrong schema or whatever.

But, I found a solution that works for me: I setup the application for POSTGRES (even if I use H2) like this:

  • download the SQL scripts provided by Camunda (see link above)
  • For H2 and Postgres: Use provided SQL files for Postgres and add them to src/main/resources folder (I put them to /migration subfolder)
  • For H2:
    – Open application.properties/yaml and set the following parameters
    spring.datasource.url = jdbc:h2:file:~/;;DATABASE_TO_LOWER=TRUE;MODE=PostgreSQL
    spring.flyway.locations = classpath:migration/camunda-postgres
    spring.flyway.schemas = camunda
    – Add
    camunda.bpm.database.type = postgres
    camunda.bpm.database.schema-name = camunda
    camunda.bpm.database.table-prefix = camunda.
    camunda.bpm.database.schema-update: false

Hint: I doublechecked the behaviour and switched back above configuration settings in bold using H2 and corresponding H2-scripts. Than the bootstrapping failed again. Since I use H2 only for fast prototyping the workaround using PG-settings is ok for me.