Unable to build Camunda DB with Spring Boot and Postgresql

Hi

I get different errors when trying to jump from default h2 database to postgresql with spring boot starter.

I have added the project in my open github repo here:

The error occurs when I run “mvn clean install”. I have tried several combinations of properties in application.properties and pom.xml dependencies, without luck.

Would be very grateful for anyone with the time to look into the code/setup, to see if there is any rookie mistakes (yes, I am a rookie). :slight_smile.

Here is an example error i get when running mvn clean install with an empty postgresql database with just “camunda” as database. It is actually filled with tables when run, but i get this error, even if I can se with a client that this and the other tables is created.:

"### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline

The error occurred while setting parameters

SQL: select * from camunda.ACT_GE_PROPERTY where NAME_ = ?

Cause: org.postgresql.util.PSQLException: ERROR: relation “camunda.act_ge_property” does not exist

Position: 15
Caused by: org.postgresql.util.PSQLException:
ERROR: relation “camunda.act_ge_property” does not exist
Position: 15
".

Hi,

does the table ACT_GE_PROPERTY exists in your database?

Cheers,
Tassilo

It is created when i run mvn install. Also the other camunda tables. I start off with just the camunda database. So, the create tables work.

Thanks for response! :slight_smile:

Hi FrankReneSorensen,

How did you solve the issue?I am facing exact same problem

Cause: org.postgresql.util.PSQLException: ERROR: relation “camunda.act_ge_property” does not exist

Thanks,
SaraHegde

@sarahegde i believe there’s a problem in your process engine configuration. Can you share your process engine configuration?

@ aravindhrs

Below are the dependencies added
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.4</version>
</dependency>

and below are the props in application.properties
camunda.bpm.database.type=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/camunda
spring.datasource.username=sas
spring.datasource.password=
spring.datasource.driver-class-name=org.postgresql.Driver
camunda.bpm.database.table-prefix=camunda.
camunda.bpm.database.schema-update=true

@sarahegde if you’re not using table/schema level isolation for multitenancy, you can remove the settings camunda.bpm.database.table-prefix=camunda. and this property spring.datasource.driver-class-name=org.postgresql.Driver not required because based on db connection url at runtime it will able to load the driver class. So explicitly no need to configure it.

Try with this solution and let me know if you face any issues

1 Like

Thanks. This worked.

This worked. Note that specifying Camunda for the db name (note the capital C) also creates this error.

Thank you sir, that truly worked. It’s worth mentioning that camunda.bpm.database.table-prefix has to have the dot at end of camunda word - “camunda.” not “camunda”. In my case this little fella was undermining the job.