Hi..I have a web application containing a servlet and some buisiness logic code. It can be accessed via https url(from a particular port). When i try to invoke the https url from Postman it is able to access the webapplication and give response. But when i try to invoke this https url via a stand alone program using java.net.HttpURLConnection i am getting below exception! As per my understanding behavior should be same like either https url can be accessible by both Postman and standalone program or both should be throwing SSLHandshakeException. Can anyone guide me why this might be happening. Do i need to change something in my program.
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
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
I've seen javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed being caused by anti-virus applications that generate fake certificates to allow inspection of TLS traffic. If you have an anti-virus application running, try disabling it and see if that helps.