SunCertPathBuilderException: Unable To Find Valid Certification Path To Requested Target

Asked By 0 points N/A Posted on -
qa-featured

While executing my program in java, I encountered an error saying SunCertPathBuilderException. How can I deal with this exception since it’s hindering the execution of the whole program? How can I fix this error permanently?

SHARE
Answered By 45 points N/A #318582

SunCertPathBuilderException: Unable To Find Valid Certification Path To Requested Target

qa-featured

If you receive this exception, there is no valid certificate from an authorized CA on the Web server or URL to which you are connecting. This solution shows how to create an approved keystore to resolve this issue. Download the Sun InstallCert.java utility to add the server certificate to the keystore and then compile the same to create .class files using “javac InstallCert.java”.Run the InstallCert class with your domain name and press Enter when prompted. It adds the domain you requested as the trusted keystore and creates a file named jssecacerts. Move the jssecacerts file to the $ JAVA_HOME \ jre \ lib \ security folder. Now that your problem is resolved, you will no longer receive this exception.

Login/Register to Answer

Related Questions