PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Error:
Resolution:
- Get the SSL certificate from your IT team
- To import this certificate on JAVA, please follow the below steps
- Open the CMD and go to you JDK/bin path, like C:\Program Files\Java\jdk1.8.0_91\bin
- Type the below command, you need to replace the highlighted part in the below command with your values.
keytool -importcert -file "D:\SSL-Certificate\filename.cer" -alias randomaliasname -keystore JAVA_HOME/jre/lib/security/cacerts -storepass changeit
- Now apply the same certificate on JRE folder as well
keytool -importcert -file "D:\SSL-Certificate\filename.cer" -alias randomaliasname -keystore JRE_HOME/lib/security/cacerts -storepass changeit