Am trying to calling Jira using Jira Rest Api. While creating a connection am getting below error.
Java Code:
public static HttpURLConnection getJiraClientConnection(final URL url) throws IOException{
PropertiesManager prMgr = PropertiesManager.getInstance();
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod(CommonConstants.GET);
conn.setRequestProperty(CommonConstants.ACCEPT, CommonConstants.ACCEPTTYPE);
conn.setRequestProperty(CommonConstants.AUTHORIZATION, CommonConstants.BASIC + prMgr.getPassword());
}
Error:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
I googled for this error, I was not getting any correct solution for this.
Thank you in advance!