繁体   English   中英

GlassFish 4和Java Mail:PKIX路径构建失败

[英]GlassFish 4 and Java Mail: PKIX path building failed

我尝试了本教程( http://czetsuya-tech.blogspot.de/2012/11/how-to-send-email-in-glassfish-using.html )。 我在Windows 7 Professional 64位上使用GlassFish 4。

本教程是否正常工作,因为我遇到了以下例外情况:

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
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

您是否篡改过/修改了$ JAVA_HOME / jre / lib / security / cacerts文件? 如果是这样,请尝试重新安装jdk。 该密钥库通常是信任证书的来源,默认情况下应接受google的信任证书。

还请注意其他可能会丢弃标准证书的JVM环境变量。 (例如:-Djavax.net.ssl.trustStore)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM