• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javax.net.ssl.SSLHandshakeException

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have applied SSL certificates to one web service(deployed on Microsoft IIS server). When i access that web service directly, it is working fine and i am able to access that web service using https.
Now, i am trying to connect to that webservice using java server in the middle and i am getting problem in this scenario.
So scenario is :
client --accesses-->application deployed on java server----calls--> Web service that is deployed in Microsoft IIS server.

I am not sure, if i am going to IIS server with java server in middle, why is it giving exception.
Exception is :
Error ; nested exception is:
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
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
unable to find valid certification path to requested target

Please help.
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't say whether this exception is coming from your client, your middleware, or your web service. The error means that you do not have your truststore configured correctly.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

greg stark wrote:The error means that you do not have your truststore configured correctly.



Or, your application deployed on Java server does not have valid/any certificate it represents to IIS. The stuff usually set up with java properties etc.
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the solution.
I imported the certificates into my java server using keytool utility and it worked fine.
Thanks.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you import the certificates? Is there a common certificate that needs to be loaded one time only, and after that whenever we connect to a https site, we dont need t worry about it?
 
reply
    Bookmark Topic Watch Topic
  • New Topic