当遇到'certpath.SunCertPathBuilderException: unable to find valid certification path to requested target'异常时,可以采取以下步骤解决:1. 创建并运行InstallCert.java生成jssecacerts文件;2. 在Java的jre/lib/security目录下替换证书;3. 重启程序。该问题通常在处理HTTPS请求,如微信支付API时出现。
摘要由CSDN通过智能技术生成
Exception in thread "main" 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
Exception in thread "main" 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 sun.security