PKG
PKG

Reputation: 301

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed

I have a class that hits a secured URL (starts with https) with a xml and at their end it process the xml and send back the response. But while doing this i am getting some exception. 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

I googled a lot and found so many answers but none of worked for me. I added the certificate to my cacerts file under ../jre/lib/security directory and also installed the certificate. but nothing is working for me. I have also checked the certificate by running InstallCert.java file and it says No errors, certificate is already trusted. Please help. Thanks in advance.

Upvotes: 0

Views: 917

Answers (1)

Golam Rabbi
Golam Rabbi

Reputation: 65

I also faced same error. On my case it happened because there were mismatched with the JDK versions with my end and the 3rd party URL which I was hitting to get JSON data.

Upvotes: 1

Related Questions