SSLProtocolException in SE7 & SE8: “handshake alert: unrecognized_name”

Caused by: com.sun.jersey.api.client.ClientHandlerException: 
javax.net.ssl.SSLProtocolException: handshake alert:  
unrecognized_name at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle (URLConnectionClientHandler.java:151) 
at com.sun.jersey.api.client.Client.handle(Client.java:648) 
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680) 
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) 
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:5 68) 

This exception is from an SSL check in SE7 and above that checks that your SSL certificate matches your domain name. For development, if you’re using a self-signed SSL certificate for testing which does not match your domain name, you can turn off the check and ignore the error with:

-Djsse.enableSNIExtension=false