1
我試過這個教程(http://czetsuya-tech.blogspot.de/2012/11/how-to-send-email-in-glassfish-using.html)。我在Windows 7 Professional 64位上使用GlassFish 4。GlassFish 4和Java Mail:PKIX路徑構建失敗
本教程的工作,因爲我得到這個異常:
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
嘿,謝謝你的回答。我有點困惑,因爲我在密鑰庫中沒有任何修改。我現在解決了這個問題。這是由Avast Antivirus引起的。我禁用了傳出smtp連接的病毒檢查。我認爲Avast取代了證書來檢查郵件的內容或類似的東西。 – Marcello90
嗯,可能你的防病毒軟件充當代理服務器,因此它可以看到正在交換的數據內容,並且由於流量是SSL,因此您將獲得防病毒的證書,而不是Google的 – gerrytan