not able to create jira issue link using JRJC

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

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
Community showcase
Posted Friday in Off-topic

Friday Fun: Dry T-Shirt Competition - What's your BEST (Atlassian) T-Shirt!?

[Note: So it was my turn for Friday Fun and sadly I was sick thanks to rubbish sinus infection... so apologies to most of Europe and Asia for the delayed post. However, I finally got out of bed for t...

140 views 8 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you