Using the PostgreSQL JDBC driver since 42.2.5, the SSL behaviour changed which can cause FileNotFoundExceptions
looking for .postgresql/root.crt
.
As a workaround you can add sslmode=require
(no certificate validation!) or sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory
(validate certificate using JRE trust store) to your JDBC URL.
Therefore a working JDBC URL looks like this:
jdbc:postgresql://dbserver:5432/database?ssl=true&sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory
This behavior and the mentioned workaround are described in https://github.com/pgjdbc/pgjdbc/issues/1307