• Post Reply Bookmark Topic Watch Topic
  • New Topic

Success response when invoking https url using Postman and failure when invoking from standalone  RSS feed

 
kranthi chamarthi
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
kranthi chamarthi
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forget to mention one point..In both Postman as well as standalone program i am not using any username and password as well as not defining any Authentication Type.
 
Vijitha Kumara
Bartender
Posts: 4002
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check the certificates (you seems to have control in the server too?) in the server? May be you need to check with installing them in your client JVM.
 
Ron McLeod
Bartender
Posts: 1603
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!