Google+ Followers

Aug 7, 2011

unable to find valid certification path to requested target

Hi,

The issue: You are probably missing the certificate for the specific site you work with.

Solution: You need to add export the certificate for the site mentioned above, After exporting it, add it to the cacerts file of java (default file) which located usually here : "c:\Program Files\Java\jdk1.6.0_23\jre\lib\security".
(the default java password for this file is 'changeit').

* If you need the export procedure, tell me, it's simple i can guide you.

In the code, add this lines :

System.setProperty("javax.net.ssl.trustStore", "path_to_cacerts_file/cacerts"); // for example c:\cert\cacerts
System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); //unless you change it


You can also create your own certificate storage file and direct java to it instead.

Helpful link to keytool can be found here.

2 comments:

  1. This is the best one for to find the solution to technical problems...

    Salesforce Training Hyderabad

    ReplyDelete
  2. interesting piece of information, I had come to know about your web-page from my friend pramod, jaipur,i have read atleast eight posts of yours by now, and let me tell you, your blog gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanks a million once again, Regards ,splunk training in hyderabad

    ReplyDelete