Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

HTTPS/HTTP SSL Handshake Exception while using TestRail Java API


Hi there,

I am trying to use TestRail Java API for my project. Whenever I am trying to access/make HTTP request to my TestRail URL (something like, my implementation is throwing PKIX path building failed:

Am I missing something? I have checked with the TestRail server guy and the server on which TestRail is deployed does support HTTPS(since that is recommended one). Is there anything missing as a part of certificate? Also, it does not seem to work for HTTP.

Here is the detailed log: PKIX path building failed: unable to find valid certification path to requested target at at at at at at at at at at at at at at at at at at at

The line at which the code fails is:

JSONArray arr = (JSONArray) client.sendGet(uri.GET_PROJECTS.toString());

Thoughts and solutions would be appreciated.


Hi Pratik,

Thanks for your posting. That’s a Java configuration issue and this is independent of TestRail. It seems that your Java installation has an incorrect SSL/certificate setup and I found the following references which should help with this:

I hope this helps!



Hi Tobias,

Excellent support. I figured out yesterday that it was an issue with my certificate.

Thanks for sending the links though (they address my question).



Hello Pratik,

Great to hear that this helped :slight_smile: