Unable to create more than one database in same server (Postgres)

Hi Team,

Unable to create more than one database in same server in Postgres. We are getting below error.

Caused by: org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table ‘sfpf.act_ge_property’ doesn’t exist

The error may exist in org/flowable/db/mapping/entity/Property.xml

The error may involve org.flowable.engine.impl.persistence.entity.PropertyEntityImpl.selectProperty-Inline

The error occurred while setting parameters

SQL: select * from ACT_GE_PROPERTY where NAME_ = ?

Cause: java.sql.SQLSyntaxErrorException: Table ‘sfpf.act_ge_property’ doesn’t exist

could you please help on this ?

Hey @a.shravankumar,

I can assure you can create more than one database in the same server in Postgres. We have a lot of customers doing this and this is how some of us work locally (with multiple databases).

Can you please share your datasource url configuration?

Cheers,
Filip

Hi Filip,

we are using jhipster+springboot application , below is the datasource configuration in application-dev.yml

datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://localhost:5432/test?currentSchema=test
username: test
password: test
driver-class-name: org.postgresql.Driver

Could you please let me know any changes requried.

Thanks,
Shravan

Hey Shravan,

Have you tried removing the currentSchema?

You asked for connecting to more than one database on the same server. The database name is the name that comes after the port. i.e. jdbc:postgresql://localhost:5432/<databaseName>.

Cheers,
Filip