PKIX path building failed: SunCertPathBuilderException: unable to find valid certification path to requested target
我这个报错主要是因为使用的maven库是https地址:
......
......
https://XXXXX
而这个url的证书在JDK的证书库不存在造成的
jre/lib/security/cacerts
因此,只需要将这个url的证书导出,再导入到cacerts中就可以了。
导入的方法可以使用命令,比如:
keytool -importcert -file jetty.crt -alias jetty -keystore $JAVA_HOME/jre/lib/security/cacerts
其它方法可参考如下文档:
"PKIX path building failed" and "unable to find valid certification path to requested target"
https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ
PKIX path building failed: SunCertPathBuilderException: unable to find valid certification path to requested target
https://magicmonster.com/kb/prg/java/ssl/pkix_path_building_failed/
Solve “unable to find valid certification path to requested target”
https://blog.packagecloud.io/solve-unable-to-find-valid-certification-path-to-requested-target/
【keytool】keytool查看jks证书详情
https://blog.csdn.net/michaelwoshi/article/details/107993556
Maven:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
https://www.cnblogs.com/wpbxin/p/11746229.html
使用Maven时出现“jssecacerts PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilde”错
https://blog.csdn.net/carrie__yang/article/details/79612385