欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决PKIX path building failed错误 javasslPKIXSSLException证书 

程序员文章站 2022-05-16 11:46:55
...
调用接口出现以下异常:
[FRIP]2018-08-13 15:23:51 [DEBUG] - org.apache.commons.httpclient.HttpConnection(1228) -Exception caught when closing output
javax.net.ssl.SSLException: Connection has been shutdown: 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


查找之后发现是用SSL连接接口,因服务器不能信任对方的证书导致。试验了几种方法,最终用以下方法解决了问题,连接地址:http://www.cnblogs.com/wanghaixing/p/5630070.html