You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am facing a problem with java compatibility, here is the detail about the SSL handshake:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1839)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1019)
--------------------------------------------------------------------
Here I am able to make a request with java 8 but not with java 6.
I need a solution to make this request with java 6 version because my client application is with java 6 version, here java8 up-gradation is not possible for time being.
My code is:
package ziraPOC;
import java.io.*;
import java.net.*;
public class JiraCreateIssue {
public static void main(String[] args) {
try {
URL jiraREST_URL = new URL("https://my-jira.com/rest/api/2/issue/");
String myvar = "{"
+ " \"fields\": {"
+ " \"project\":"
+ " { "
+ " \"key\": \"RMP\""
+ " },"
+ " \"summary\": \"REST ye merry gentlemen.\","
+ " \"description\": \"Creating of an issue using project keys and issue type names using the REST API\","
+ " \"issuetype\": {"
+ " \"name\": \"RM Deal Ticket\"" + " }"
+ " }" + "}";
HttpURLConnection conn = (HttpURLConnection) jiraREST_URL.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
String encodedData = myvar;
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Basic xxxxxxxxxxxxxxxxxxxxxxx=");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Content-Length", String.valueOf(encodedData.length()));
conn.getOutputStream().write(encodedData.getBytes());
System.out.println(conn.getResponseCode()+" response code");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String outputJson="";
String output;
while ((output = in.readLine()) != null) {
outputJson=outputJson+output;
}
System.out.println("Response: "+outputJson);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Can any one help me on this, I am trying to resolve this issue from long time.