+ Start a Discussion

Certificate Exception when connecting to salesforce



we have a webservice which connects to salesforce.com. Sometimes, we get an exception of mismatching name in certificate.


   at java.lang.Thread.run(Thread.java:636)
Caused by: com.sforce.ws.ConnectionException: Failed to send request to



Caused by: javax.net.ssl.SSLHandshakeException:
java.security.cert.CertificateException: No name matching
eu0-api.salesforce.com found


Does anyone have an idea?


Having the same issue. Anybody found a solution to this?


Thank you!

Santhosh KumarSanthosh Kumar

This may be because in sandboxes Salesforce uses self-signed certificates. These certificates cannot be validated using your local trusted certificates. So you either have to disable the certificate check or add the salesforce certificates to your trusted cert pool.