[英]PKIX building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I am running an application in Eclipse locally.我正在本地运行 Eclipse 中的应用程序。 It tries to connect to an external URL to fetch some data.它尝试连接到外部 URL 以获取一些数据。 This application works fine from browser, but when I try the same from Eclipse as localhost, I get the below error:此应用程序在浏览器中运行良好,但是当我从 Eclipse 尝试相同的本地主机时,我收到以下错误:
Caused by: 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.validator.PKIXValidator.doBuild(PKIXValidator.java:456)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:323)
at sun.security.validator.Validator.validate(Validator.java:271)
Many solutions, have mentioned to add the URL certificate from the browser using keytool.许多解决方案都提到了使用 keytool 从浏览器添加 URL 证书。 This application shows "This site does not have a certificate.".此应用程序显示“此站点没有证书。”。 The application URL does not have a certificate.应用程序 URL 没有证书。
In this case, how can I fix this issue without a certificate to install?在这种情况下,如何在没有安装证书的情况下解决此问题?
Regards, R问候, R
looks like you are running any java based application on a web server(eg Tomcat) with HTTPS enabled.看起来您正在启用 HTTPS 的 web 服务器(例如 Tomcat)上运行任何基于java的应用程序。
If you donot have signed any self certificate, then following link can help: How to configure Tomcat to support SSL or https如果您没有签署任何自我证书,那么以下链接可以提供帮助: 如何配置 Tomcat 以支持 SSL 或 https
Further this link has discussed the matter in detail: Stackoverflow Link此外,此链接已详细讨论了此问题: Stackoverflow Link
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.