Trying to connect from an application using C3P0 and the latest Postgresql JDBC driver 9.4.1211.
We want the connection string to be SSL and have an MD5 hash password on the user account:
c3p0 {
jdbcUrl = "jdbc:postgresql://myserver.rds.amazonaws.com/MyDatabase?ssl=true"
user = MyAccount
password = MyPassword
testConnectionOnCheckout = true
}
The server has generated SSL certificates,which have been referenced in the parameter group, along with ssl = 1
.
The certificate has been added into the JVM cacerts
What we are getting an error:
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database! com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118) com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0Pcom.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPool
We can use the same account to connect successfully via psql and pgadmin.