This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.net.ssl.SSLHandshakeException

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
greg stark
Ranch Hand
Posts: 220
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Dejan Mratinkovic
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
SunnySingh Singh
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic