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 from

Install the

1. Compile the class using “javac” 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 file. So copy jssecacerts to the $JAVA_HOME\jre6\lib\security directory.

Now run webservice client again. It should work.

One Reply to “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.