Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to find and add the missing certificate to my JDK?

2947632Jan 10 2016 — edited Jan 10 2016


Hello Friends,


I have a simple JAVA application which connects to HTTPS website and downloads a file from there. This JAVA application has been deployed to a Unix server in the form of a JAR file. When I run the JAR, I get following exception :


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


When I searched this exceotion on Google, I came to know that the solution is to add the missing certificate to the keystore. But the thing is, I do not know how to find that which certificate is missing.  And after finding it , how to add it? Where to add it?

There are many posts on multiple websites for above exception, but I get stuck on how to know the missing certificate, the server-alias of the https server and many more questions. Can someone help me with the exact steps?

Thanks in advance...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2016
Added on Jan 10 2016
2 comments
3,980 views