Wednesday, December 30, 2009

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed

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

I had upgraded Xythos software for content management and their wiki feature failed to launch everytime because of the error above. The cert was from godaddy and the web server was jakarta tomcat. The cert worked fine for everything except the wiki feature. Took me sometime before figuring out what the issue was.
My version of jdk was 1.5.0_06 then. Upon installing JDK1.6.0_17 it worked like a charm. So whenever you get a ssl handshake exception, try upgrading your JDK to latest version from http://java.sun.com/javase/downloads/index.jsp before venturing out other options.

In cases where your system talks with a different system using ssl then you will need to import the ssl cert of the other system to your keystore. Sometimes, that might not work because the cert from the other system might not be from a notable CA. Java hiccups when using free certs from providers like IPSca. In such cases you will need to import the cert from the other system to the "cacerts" keystore located in C:\Program Files\Java\jdk1.6.0_17\jre\lib\security\.

No comments:

Post a Comment