Eclipse中的PKIX路径构建失败 [英] PKIX path building failed in Eclipse

查看:824
本文介绍了Eclipse中的PKIX路径构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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:

  1. 您将证书安装到Eclipse正在使用的JRE的cacerts文件中
  2. 证书是根证书
  1. you install certificate to cacerts file of JRE which Eclipse is using
  2. certificate is root certificate

这篇关于Eclipse中的PKIX路径构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆