Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,328,696
Community Members
 
Community Events
168
Community Groups

Exception in thread "main" RestClientException{statusCode=Optional.of(500)

Edited

Hi, I'm trying to create an issue using jira rest API. But I have this error : 

Exception in thread "main" RestClientException{statusCode=Optional.of(500), errorCollections=[ErrorCollection{status=500, errors={}, errorMessages=[Internal server error]}]}
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.claim(DelegatingPromise.java:47)
at Myjira.createIssue(Myjira.java:78)
at Myjira.main(Myjira.java:51)
Caused by: RestClientException{statusCode=Optional.of(500), errorCollections=[ErrorCollection{status=500, errors={}, errorMessages=[Internal server error]}]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:67)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:11)
at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268)
at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158)
at com.google.common.util.concurrent.Futures$7.run(Futures.java:1072)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
at com.google.common.util.concurrent.AbstractFuture.done(AbstractFuture.java:235)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:172)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268)
at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158)
at com.google.common.util.concurrent.Futures$7.run(Futures.java:1072)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
at com.google.common.util.concurrent.AbstractFuture.done(AbstractFuture.java:235)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:172)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:46)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

 This my code. The error is in the return line. 

private String createIssue(String projectKey, Long issueType, String issueSummary) {

IssueRestClient issueClient = restClient.getIssueClient();

IssueInput newIssue = new IssueInputBuilder(projectKey, issueType, issueSummary).build();

System.out.println("Values of issue " + newIssue.getFields().values().toString());

return issueClient.createIssue(newIssue).claim().getKey();
}

1 comment

I am running into similar issue, what is the solution to the above error ?

Comment

Log in or Sign up to comment