开发者

How to solve sun.security.provider.certpath.SunCertPathBuilderException?

I have written some code to connect to my mail server and read emails. I am using POP3 using SSL connection. I hav开发者_如何学JAVAe also added SSL certificate to the java keystore. But still i am getting the same exception. Please help. Thanks in advance.


Possible cause this exception would be the cert from the keystore does not match the cert from the server.

Checkout these link might be helpful to you:

  • Unable to Connect to SSL Services due to PKIX Path Building Failed sun.security.provider.certpath.SunCertPathBuilderException
  • How to handle invalid SSL certificates with Apache HttpClient?


I got the same error, I disabled always scan encrypted connections in the settings of my antivirus software, and it worked.


I have groovy script, and I was using @Grab(group='org.apache.commons', module='commons-collections4', version='4.2')

I could not runt it because of an error Error grabbing Grapes -- [unresolved dependency: org.apache.commons#commons-collections4;4.2: not found]

Using -Divy.message.logger.level=4 I saw I was having the following problem:

Server access error at url https://repo1.maven.org/maven2/org/apache/commons/commons-collections4/4.2/commons-collections4-4.2.pom (javax.net.ssl.SSLException: Received fatal alert: protocol_version)

My qick fix was to use JDK8 instead of JDK7 it seems that JDK8 has updated certificates and it worked

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜