The issue is something tricky. I tried to connect my war file to a Active Directory via LDAPS. While running with Debug Mode from IntelliJ IDEA, the code is working perfectly fine.
When I Install the war files in same or different machine, am facing this error.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The certificates are self-signed. I have added the CA.crt in truststore.jks
, LDAP.cer in cacerts
. I also tried adding in the `jssecacerts', but same result.
Note: Am using Apache Shiro framework.
How to avoid this error? Why it is not coming in the debug mode?