bobcarroll / jira-client

A simple JIRA REST client for Java
Other
476 stars 380 forks source link

net.rcarz.jiraclient.JiraException: Failed to retrieve issue metadata #253

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi @rcarz , getiing issue with createIsuue in JiraClient

BasicCredentials creds = new BasicCredentials("*", ""); JiraClient jira = new JiraClient("http://localhost:8080/login.jsp", creds); / Create a new issue. / Issue newIssue = jira.createIssue("WEB", "Bug") .field(Field.SUMMARY, "This is test bug") .field(Field.DESCRIPTION, "Description of test bug.") .field(Field.REPORTER, "se.pradeepkumar") .field(Field.ASSIGNEE, "se.pradeepkumar") .execute(); System.out.println(newIssue);

         /* Retrieve issue WEB-1 from JIRA. We'll get an exception if this fails. */
         Issue issue = jira.getIssue("WEB-1");

         /* Print the issue key. */
         System.out.println(issue);

         /* You can also do it like this: */
            System.out.println(issue.getKey());

60387378-ab025a80-9abf-11e9-92d6-0e3bbd4fc34e

totallytot commented 5 years ago

Hi @testingxpertshyd , Just use your Api token instead of password if you are using Jira Cloud: image

suryajit7 commented 3 years ago

I'm also facing the same issue.... I'm using Jira cloud with SSO

carrigiljavia commented 2 years ago

This statement in the class RestClient is causing a malformed URL adding a null ub.setPath(ub.getPath() + path);

your new URL will be this http://totallytot.atlassian.net/null/rest/api/... this for httpclient-4.5.13.jar