SSL connection to Postgres with self-signed certificate

I would try adding your self signed cert as a trusted one in the Java keystore. See MongoDb SSL Connection with Self Signed Certificate issue for a similar story with MongoDB.