Is camunda 7.20 ignoring H2 SQL modes? In Postgres mode, H2 Scripts are executed.

Hi Community,

I was just about to setup a clean spring boot setup (Camunda 7.20.0, SpringBoot 3.1.6) and when I startup the application I get the exception that the create table ACT_GE_BYTEARRAY failed because of trying to create BYTES_ as blob. However the engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.postgres.create.case.engine.sql should have been executed.

The application.yaml for the db configuration is as follows:
spring:
jpa:
show-sql: false
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
datasource:
url: jdbc:h2:mem:testdb;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;TRACE_LEVEL_SYSTEM_OUT=0;

If I change the dialect and mode to h2 everything works fine. But I used to work always with the Postgres mode. I have not investigated now since when this seems to happen.

Any ideas?

Thank you in advance
Ben

Hi Ben,

Camunda doesn’t support H2 in Postgres mode, meaning that we never develop for this use case or test this setup.

Cheers,
Thorben

Hey Thorben,

tanks you for the answer. I wasn’t aware as it used to work. But good to know that for development I was using something unsupported. I switched it now properly.

Cheers,
Ben

Hi Ben,

Good that you can make progress and interesting that it used to work. If you are curious to find the reason, you could debug into ProcessEngineConfigurationImpl#initDatabaseType and compare between the two versions. My best guess would be that either the Camunda logic changed there or H2 returns a different value with a newer version.

Cheers,
Thorben