In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to solve the problem of the coexistence of Java mail ssl, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Recently, I encountered a problem in doing java mail ssl: using JavaMail to receive mail failed after the system was running for a certain time.
The error message goes like this:
Javax.mail.MessagingException: Connect failed
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
At com.sun.mail.pop3.POP3Store.protocolConnect (POP3Store.java:148)
At javax.mail.Service.connect (Service.java:275)
At javax.mail.Service.connect (Service.java:156)
At javax.mail.Service.connect (Service.java:105)
Or an error occurs on a mail server that does not enable SSL as follows:
Nested exception is:
Java.net.ConnectException: Connection refused
At com.sun.mail.pop3.POP3Store.protocolConnect (POP3Store.java:148)
Telnet to the mail server, there is no problem with the user name and password, it seems that there is only a program problem.
Properties props = System.getProperties () is used when creating MailSession; I found an error when printing this. I should not have used SSL verification, but the verification information should not appear, so now if you do not need SSL links to remove these attributes every time you link to POP3, there will be no problem.
Finally know who changed System.getProperties (); originally in the same Tomcat also runs another system, that system uses the mail server is using SSL verification to send and receive mail, and 30 minutes will receive mail, because the program is not rigorous enough, there are the above errors, improved procedures, the two systems can finally co-exist in a TOMCAT.
Thank you for reading this article carefully. I hope the article "how to solve a problem of Java mail ssl coexistence" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.