not able to create jira issue link using JRJC

Ankit jain October 17, 2013

Hi

I have implemented jirarestclient using AsynchronousJiraRestClientFactory. Then fetching Issuerestclient like below and trying to link issue.

IssueRestClient issueRestClient=jiraRestClient.getIssueClient();

issueRestClient.linkIssue(linkIssueInput);

It gives below exception for json creation. Can anyone give an example of creation of issue Link.

com.atlassian.jira.rest.client.RestClientException: org.codehaus.jettison.json.JSONException: A JSONObject text must begin with '{' at character 1 of <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>404</status-code><message>null for uri: http://localhost:8080/rest/api/latest/issueLink/rest/api/latest/serverInfo</message></status>

at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:167)

at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:159)

at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:48)

at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:12)

at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:285)

at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:162)

1 answer

1 vote
Aleksander Mierzwicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2013

Have you configured properly base url for your JIRA instance? The URI in exception doesn't look good:

http://localhost:8080/rest/api/latest/issueLink/rest/api/latest/serverInfo

I guess that your base URI should look like that: http://localhost:8080/</strong<>>

And I guess that you've used that base URI instead: http://localhost:8080/rest/api/latest/issueLink

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events