I was attempting to create a project in STS 3.3.0 (Eclipse) using the new Spring Project wizard. However the only templates available to me where those in the Simple Projects group. In the Error Log in Eclipse I noticed I was getting the “PKIX path building failed” exception when STS was attempting to download additional templates from https://raw.github.com/. This post explains how I resolved the issue.
I did some googling on the issue and the recommendations were to upgrade to the latest version of Java. I tried this but the problem persisted. Then I found another post which provided a Java source file InstallCert.java. I built and ran the file but because of the proxy in between my workstation and the internet it failed to connect to raw.github.com:443.
Next I used my browser to check the URL STS was trying to reach i.e. https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/descriptor.xml. My browser was able to reach the URL without any issues. At this point I took a closer look at the certificate for the page. It turned out that my proxy server had done some rework on the certificate and had its own certificate in the chain. I was able to export the certificate using my browser and store it as a DER file. Next I added the certificate to my JRE cacerts keystore using the following command.
keytool -importcert -keystore c:\dev\jdk7\jre\lib\security\cacert -file c:\temp\webproxy.cer
When prompted for a password the default is “changeit”. It might be prudent to backup your cacerts file before changing it. On a related note this fix also sorted out a problem I was having with JVisualVM when downloading plugins.