Cannot connect to heroku postgres database using Netbeans

I am trying to connect to a database hosted at https://postgres.heroku.com/databases using Netbeans (built-in) services / databases. I get this error

Cannot establish connection with JDBC: PostGreSQL: //ec2-xx-xxx-xxx-xxx.compute-1.am

I tried this without problems: 1. Netbeans connects to the local postgres database. 2. Using PgAdmin III to access postgres heroku databases.

I tried to download the latest postgres driver and use it in netbeans to create a connection, but with the same error.

Thanks in advance!

+4
source share
1 answer

If connecting outside Heroku (e.g. locally), add this to the end of the URL of your JDBC connection:

?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory 
+10
source

All Articles