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

查看:95
本文介绍了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!

推荐答案

请参考这个答案供您参考.

在您成功安装导致 PKIX 错误的站点证书后,无需传递任何 VM 参数!

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. 证书是根证书

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

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