I am using Hibernate latest version 4.3.5.Final
.
My hibernate.cfg.xml
file content:
I encountered this issue when using the following:
I had SSL
enabled on the database side as part of the host-based authentication mechanism (using Postgres) and the issue was that I hadn't specified the SSL
JVM properties related to the key store containing the certificate of the client app when starting the application:
-Djavax.net.ssl.keyStore=mykeystore.jks -Djavax.net.ssl.keyStorePassword=myPassword
Note: I understand the answer has already been answered, but I'm leaving this answer for future reference.