Failed to get data from https web api

Exception in the "main" thread

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: Failed to create PKIX path: sun.security.provider.certpath.SunCertPathBuilderException: Unable to find a valid certification path for the requested target

Can anyone face this problem?

+3


source to share


1 answer


1.Compile and run java class https://github.com/escline/InstallCert/blob/master/InstallCert.java

2.Run java InstallCert

3. Upon receipt of certificates and will create a new file "jssecacerts" on the desktop.



4.Copy paste this file to / javaHome / jre / lib / security.

5. Now you can go to the https web api.

Likewise, what you should do on the real server where you will deploy the webApp.

+3


source







All Articles