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 Continue Reading…

java.security.cert.CertificateException: No name matching localhost found

To fix it, add a javax.net.ssl.HostnameVerifier() method to override the existing hostname verifier like this : Before having a look at this issue resolver, go through the tutorial using SSL with jax-ws webservice java.security.cert.CertificateException: No name matching localhost found was last modified: January 26th, 2015 by Soumitra