javax.websocket.DeploymentException: The HTTP request to initiate the WebSocket connection failed
...
Caused by: java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
# 與jar包運行的java環境保持一致,直接在對應服務器上編譯
javac InstallCert.java
安裝目標服務器的證書:
java InstallCert app.test.com:443
# 執行完這個命令以後會在當前目錄生成一個名爲jssecacerts的文件, 複製到$JAVA_HOME/jre/lib/security這個目錄下, 然後重啓程序就好了.
.