[Solved-4 Solutions] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error
Error Description:
We get this error
- Detailed message sun.security.validator.ValidatorException: PKIX path building failed:
- sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- cause 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
Solution 1:
Solution 2:
- Set below in environment variable
Solution 3:
- Set below in environment variable
Solution 4:
- You need to add the certificate for App2 to the truststore file of the used JVM located at %JAVA_HOME%\lib\security\cacerts .
- First you can check if your certificate is already in the truststore by running the following command: keytool -list -keystore "%JAVA_HOME%/jre/lib/security/cacerts"
- If your certificate is missing you can get it by downloading it with your browser and add it to the truststore with the following command:
- After import you can run the first command again to check if your certificate was added.