Letzte Blogger

James Falkner

Staff
103 Nachrichten
3. März 2015

Shannon Chang

Staff
2 Nachrichten
3. März 2015

Ruud Kluivers

Staff
15 Nachrichten
3. März 2015

Fady Hakim

Staff
5 Nachrichten
1. März 2015

Andrea Di Giorgi

4 Nachrichten
27. Februar 2015

David Kubitza

3 Nachrichten
27. Februar 2015

Brett S. Kobold

Staff
1 Nachrichten
26. Februar 2015

Angela Wu

Staff
5 Nachrichten
26. Februar 2015

Jorge Ferrer

Staff
60 Nachrichten
25. Februar 2015

Jose M. Navarro

Staff
3 Nachrichten
22. Februar 2015
« Zurück

Fixing SunCertPathBuilderException caused by Maven downloading from self-signed repository

Company Blogs 11. August 2011 Von Neil Griffin Staff

If you have a Maven repository running under https with a self-signed certificate, then building a Maven project can report the following error:

Error transferring file: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

There was an Oracle blog posted by Andreas Sterbenz back on Oct 09, 2006 that helped me diagnose the problem, but that blog is no longer available. Thankfully Andreas' blog was re-posted here. For additional information, I found another blog post that was helpful.

Anyways, I fixed this problem by downloading and compiling the source for InstallCert.java and running the following command:

java com.aw.ad.util.InstallCert myhostname.mydomain.com

This generated a file named jssecacerts in the current directory.

On Windows/Linux, this file needs to be copied to the JAVA_HOME/jre/lib/security/ directory.

On Mac needs to be copied to the JAVA_HOME/lib/security/ directory.

After I did this, Maven was able to download the artifacts from the self-signed repository.

 

 

Antworten im Thread Autor Datum
This was useful even after 3+ years. Thanks Neil. Jack Bakker 22. Februar 2015 11:55

This was useful even after 3+ years. Thanks Neil.
Gepostet am 22.02.15 11:55.