Not able to fetch data from https web api

0 投票
最新提问 用户: 匿名

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

anyone have face this issue ?

1个回答

0 投票
最新回答 用户: (360 分)

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

2.Run java InstallCert

3.It will fetch the certificates & create a new file "jssecacerts" on desktop.

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

5.Now you can hit the https web api.

Similar you have to do on live server where you will deploy the webApp.

欢迎来到 Security Q&A ,有什么不懂的可以尽管在这里提问,你将会收到社区其他成员的回答。
...