Tôi đã cố gắng kết nối với DB của mình sau cả ngày. Tôi có thể làm điều đó thông qua pgAdmin, nhưng tôi không thể kết nối thông qua mySQLWorkbench để di chuyển nó và cũng không thể kết nối thông qua Intellij IDEA. Chúng tôi sẽ bắt đầu w/Intellij dù ...Kết nối với Postgres Heroku DB thông qua Intellij IDEA
Vì vậy, khi tôi cố gắng để kết nối thông qua IntelliJ, tôi có được điều này ...
Connection to Sinthetics failed
java.sql.SQLException: SSL error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
tôi thực hiện việc này để có nghĩa là tôi cần một giấy chứng nhận, kể từ Tôi đang sử dụng SSL (vì nó là một postgres/heroku). Vì vậy, tôi chạy InstallCert tiện dụng của tôi như vậy ...
java InstallCert ec2-54-243-235-169.compute-1.amazonaws.com:5432
Và trở lại này:
Loading KeyStore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts...
Opening connection to ec2-54-243-235-169.compute-1.amazonaws.com:5432...
Starting SSL handshake...
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:953)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
at InstallCert.main(InstallCert.java:87)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934)
... 4 more
Could not obtain server certificate chain
Vì vậy, tại sao tôi không thể có được một cert cho điều này, nhưng nó kết nối với không có vấn đề với pgAdmin !? Có ai có một đầu mối ở tất cả?
Đó không làm việc cho tôi, tôi nhận được một lỗi: java.lang.ClassNotFoundException: org.postgresql.ssl.NonValidatingFactory [2017/01/20 19:52:20] \t tại java. net.URLClassLoader.findClass (URLClassLoader.java:381) [2017-01-20 19:52:20] \t tại java.lang.ClassLoader.loadClass (ClassLoader.java:424) [2017-01-20 19: 52:20] \t tại ... – Pille
Đối với tôi, điều này đã hiệu quả. Cảm ơn! – studersi