[英]PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I am trying to connect to a mail server and read my inbox. 我正在尝试连接到邮件服务器并阅读我的收件箱。 My code works for gmail but does not seem to work with my exchange server because of the error:
我的代码适用于gmail,但由于错误而似乎不适用于我的交换服务器:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
I have tried the following as per my research: 1. downloaded the InstallCert.java and ran the folllowing command: 根据研究,我尝试了以下操作:1.下载InstallCert.java并运行以下命令:
java InstallCert mail.simbatech.biz:993
and imported the one certificate that came in, I afterwards copied the jssecacerts
file to jre/lib/security directory of my java Installation but the same error still persists. 然后导入一个证书,然后将
jssecacerts
文件复制到Java安装的jre / lib / security目录中,但是相同的错误仍然存在。 Is there Any other way to do this? 还有其他方法吗?
It sounds like you're doing the right things, but apparently your application is not using the certificate file you created. 听起来您在做正确的事,但是显然您的应用程序没有使用您创建的证书文件。 Where is your application running?
您的应用程序在哪里运行? If it's running in an application server, the server may be overriding the trust store configuration and may thus be ignoring your jssecacerts file.
如果它在应用程序服务器中运行,则该服务器可能会覆盖信任存储库配置,因此可能会忽略您的jssecacerts文件。 Try enabling additional debug output as described in the JavaMail FAQ .
尝试按照JavaMail FAQ中的说明启用其他调试输出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.