This message was deleted.
# general
s
This message was deleted.
b
I have seen the “Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target” usually due to a corporate VPN. In my case we use “Global Protect”. In our case Maven dependency downloads and other HTTPS connections were failing from any Java IDE (Eclipse, Spring Tools etc.) while having Global Protect active. 1. Global Protect replaces the Certificate Chain of HTTPS connections by Corporate self-signed certificates using none of the public CA Root Authorities. 2. Java’s default truststore (cacert) only trusts certificates from known CA Root Authorities. a. So we were getting certificate errors like this: i. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Solution We were able to configure Java to use the Windows Root Certificate trust store. After setting these JVM properties Java is able to connect to all HTTPS resources with Global Protect enabled. List of all Java 8 built in security and trust store providers. https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#Apple Windows
Copy code
-Djavax.net.ssl.trustStore=NONE
-Djavax.net.ssl.trustStoreType=Windows-ROOT
Mac
Copy code
-Djavax.net.ssl.trustStoreType=KeychainStore
Here is a Stackoverflow link on the issue: https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ
💯 1
e
Thank you I will give this a try. In my case thought its not due to VPN (I’m not on VPN).