Eclipse中的PKIX路径构建失败 [英] PKIX path building failed in Eclipse
问题描述
我正在使用Liferay,并且正在使用eclipse,并使用加密套接字(SSL)运行客户端/服务器模型.
i'm working with Liferay and i'm using eclipse, and running a client/server model, using an encrypted socket (SSL).
当前,当我以批处理模式运行应用程序时,我的应用程序运行的客户端/服务器连接正常,但是当我尝试在Eclipse中启动服务器时,应用程序给了我错误
Currently, my application is running the client/server connection ok when I run the application in batch mode but when i try to start the server in Eclipse the application is giving me error
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
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
我已经使用InstallCert.java并将jssecacerts复制到
I already use the InstallCert.java and copy the jssecacerts into
%JAVA_HOME%/jdk_version/jre/lib/security
%JAVA_HOME%/jdk_version/jre/lib/security
但是仍然给我错误.我还检查了证书(keytool -v -list),并在受信任的根CA中手动安装了证书.可能是什么问题?谢谢!
but is still giving me errors. I've also checked the certificate (keytool -v -list) and installed manually in the root CAs trusted. What can be the problem? Thanks!
推荐答案
请参考此答案供您参考.
成功安装该站点的证书后,无需传递任何VM参数,这将给您PKIX错误!
No need of passing any VM arguments after you successfully installed certificate of the site which is giving you PKIX error!
但是关键是要找到给您这个错误的JRE!因此,请确保两件事:
But key is to find JRE which is giving you this error! So make sure about 2 things:
- 您将证书安装到Eclipse正在使用的JRE的
cacerts
文件中 - 证书是根证书
- you install certificate to
cacerts
file of JRE which Eclipse is using - certificate is root certificate
这篇关于Eclipse中的PKIX路径构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!