• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 3895
542
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic