Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error while using jira rest java client core

Arundathi_G_Vardhan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2020

Hi All,

I am using jira rest java client core in my java project to get issue types based on project key in JIRA. I added proper dependencies and correct code but still, I am getting the below error. kindly someone can help me to resolve this error. This code was previously working now from few days I'm getting the below error

 

Exception:

RestClientException{statusCode=Optional.absent(), errorCollections=[]}
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.claim(DelegatingPromise.java:45)
at com.test.service.JiraClient.getIssueTypeId(JiraClient.java:195)
at com.test.service.TestClient.main(TestClient.java:24)
Caused by: RestClientException{statusCode=Optional.absent(), errorCollections=[]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$3.apply(AbstractAsynchronousRestClient.java:191)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$3.apply(AbstractAsynchronousRestClient.java:185)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:57)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:10)
at io.atlassian.util.concurrent.Promises$OfStage.lambda$fold$4(Promises.java:332)
at io.atlassian.util.concurrent.Promises$OfStage$$Lambda$63.000000008CD38340.apply(Unknown Source)
at io.atlassian.util.concurrent.Promises.lambda$biFunction$7(Promises.java:422)
at io.atlassian.util.concurrent.Promises$$Lambda$71.000000008CD39FD0.apply(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:907)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2144)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1.lambda$doCompleted$0(SettableFuturePromiseHttpPromiseAsyncClient.java:37)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$$Lambda$85.0000000000220810.run(Unknown Source)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:61)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:129)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)
at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487)
at com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:192)
at com.atlassian.jira.rest.client.internal.json.ProjectJsonParser.parse(ProjectJsonParser.java:56)
at com.atlassian.jira.rest.client.internal.json.ProjectJsonParser.parse(ProjectJsonParser.java:36)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$1.handle(AbstractAsynchronousRestClient.java:148)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$3.apply(AbstractAsynchronousRestClient.java:189)
... 18 more

 

build.gradle

compile 'com.atlassian.platform:platform:5.0.21'
compile 'com.atlassian.jira:jira-rest-java-client-core:5.2.1'

compile 'io.atlassian.fugue:fugue:4.7.2'

 

 

code

Project project = _restClient.getProjectClient().getProject(<project_key>).claim();


OptionalIterable<IssueType> issueType = project.getIssueTypes();

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events