Certificate error while running JUnit in Spring Java application in IntelliJ

44 views Asked by At

I am getting this error while running JUnits in Spring Java Project IntelliJ for some of the JUnits only, which is making real connection with external system with URL

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

1

There are 1 answers

0
KJ21 On

I installed zscaler certificate in jdk\jre\lib\security\cacerts keystore and updated cacerts under directory java\test\resources\certs location. It resolved the issue.