SunCertPathBuilderException: unable to find valid certification path to requested target

Before reading this tutorial please go through the tutorial using SSL with jax-ws webservice

Download the InstallCert.java from  http://blogs.sun.com/andreas/resource/InstallCert.java

Install the InstallCert.java

1. Compile the class using “javac InstallCert.java” in command prompt
2. Execute the command “java InstallCert localhost:8443” in command prompt

After installation, now you will get following output in command prompt

 

Now check whether certificate added to the keystore using “java InstallCert localhost:8443” in command prompt. You will get the following output.

 

So from the above output it’s obvious that certificate already added to the keystore.

Now certificate file “jssecacerts” has been generated at the same location where you have put the InstallCert.java file. So copy jssecacerts to the $JAVA_HOME\jre6\lib\security directory.

Now run webservice client again. It should work.

Soumitra

Software Professional, I am passionate to work on web/enterprise application. For more information please go to about me. You can follow on Twitter. You can be a friend on Facebook or Google Plus or Linkedin

One thought on “SunCertPathBuilderException: unable to find valid certification path to requested target

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.