javax.net.ssl.SSLHandshakeException: unable to find valid certification path to requested target

Error: 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

Cause: The certificate not in trusted list of JVM.

Solution: Add the certificate to trusted list by compiling and running the following Java class from the download link below (modified from the one posted at http://code.naishe.in/2011/07/looks-like-article-no-more-unable-to.html). Note: The certificate file(path) may have to be edited and set to the file used by your JVM to look up certificates.

Download InstallCert.java

Sreekumar Kj
Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics. He now runs a conversational AI company - DheeYantra - focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.