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

Getting below exception while accessing TestRail using Java bindings


#1
Exception in thread "main" 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
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)

I got the above error while accessing the TestRail using Java bindings. Looks like a SSL Certificate issue. Can you please help me on this?


#2

Hi Sanjay,

Thanks for your posting. Yes, this looks like an SSL certificate issue. Do you use a custom SSL certificate with a self-hosted TestRail instance? It could also be that your Java environment is missing some SSL certificates. Here’s a good overview of this issue and possible solutions and you would likely need to add a custom key store:

http://stackoverflow.com/questions/9210514/unable-to-find-valid-certification-path-to-requested-target-error-even-after-c

Cheers,
Tobias