Girbouillle
Girbouillle

Reputation: 73

I can't connect to my DB. (PostgreSQL, Spring boot, JHipster)

I have a little issue. I was working on the dev mode in Jhipster with H2. And now I'm trying the prod mode but there's an issue with the connection to the PostgreSQL server. I'm using pgAdmin4.

It says that the password can't be null and if I put a password it doesn't like to. Its the first running, so I imagine that the application create the DB. Am'I wrong?

I'm new on Spring boot & JHipster. Its the standard configuration.

there's the configuration:

  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:postgresql://localhost:5432/KoseCleaning
    username: KoseCleaning
    password: 
    hikari:
      poolName: Hikari
      auto-commit: false

Edit: Errors:

Without password: Caused by: java.lang.IllegalArgumentException: Null value for 'password'

With password : Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "XXX"

Thanks in advance.

Upvotes: 0

Views: 1948

Answers (1)

Gaël Marziou
Gaël Marziou

Reputation: 16294

The app does not create the db nor users, you must do it. Liquibase only creates the objects (tables, indexes, ...) in an existing schema.

As a side note, I'd recommend not using H2 in dev, rather use same db as in prod with testcontainers profile generated by JHipster to discover problems earlier and get access to the full power of your database rather than limiting you to a subset supported by H2.

Upvotes: 2

Related Questions