Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

jira-rest-java-client-core 5.1.6 and JSONException


I've been using com.atlassian.jira 5.1.6 library for a weeks and it was fine. Today (18/02/2020) it stoped to work. I have a org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.

Any idea please??  Thanks...





String JQL_JIRA_ACTIVE_SUBPROYECTS = "issuetype = Epic AND project in (SRT) AND status = 'In Progress' ORDER BY cf[12818] DESC, lastViewed DESC";

AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
jiraClient = factory.createWithBasicHttpAuthentication(new URI(MY_URI), MY_USR, MY_TOKEN);
SearchResult result = (SearchResult) jiraClient.getSearchClient().searchJql(JQL_JIRA_ACTIVE_SUBPROYECTS).get();


Throwable , RestClientException{statusCode=Optional.absent(), errorCollections=[]} :java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.absent(), errorCollections=[]}
at java.util.concurrent.CompletableFuture.reportGet(
at java.util.concurrent.CompletableFuture.get(
at io.atlassian.util.concurrent.Promises$OfStage.get(
at TestConnetJira.test(
at TestConnetJira.main(
Caused by: RestClientException{statusCode=Optional.absent(), errorCollections=[]}
Caused by: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at org.codehaus.jettison.json.JSONObject.get(
at org.codehaus.jettison.json.JSONObject.getString(


7 answers

1 accepted

1 vote
Answer accepted

Good Morning.

First, excuse me for my English ... The problem is that jira, for a few days, does not return the "name" field of the user and when parsing the JSON, when not finding the parameter, it returned an exception.

I have solved it in a way that is not the best and I don't like it, but at the moment I couldn't find another one: decompile the class and in the parseBasicUser method replace:

username = json.getString ("name");


String username = "";
if (json.has ("name")) {
username = json.getString ("name");

I will be attentive to the next attlassian library in case they solve this problem since although it works in this way, you are modifying a foreign class and it is not the best solution.

I hope it helps you. A greeting and thanks for the help.


The latest dependency solves the issue

Looks like this is the cause. Jira Cloud API doesn't return name of user anymore. We also stuck with this error today.

NOTE: Personal data that is used to identify users, such as username and userKey, has been removed from the Confluence Cloud REST API


Hi. it seems they hide information about userKey and usrname.

If we look into the getting user info we can not find data about userKey and usrname.


 "key": "",
  "accountId": "5b10a2844c20165700ede21g",
  "name": "",


Assumption is that BasicAuthentication has been deprecated as the response message is the text:

"Basic auth with password is not allowed on this instance" 

As this is not in a JSON from you get the 


error as the error text is not in JSON format.


So it would seem that you need to authenticate via API tokens instead. Can't confirm this, but thats my assumption

Same problem here!

Hi, having the same problem with jira-rest-java-client-api-5.1.0 library.

Observed the issue was raised also here:

And the reason behind it is:

Not sure if an update for the libraries is available at the moment.

Stuck with the same thing when I try to do getIssue by passing the ticket number. Any idea how to fix this?

Suggest an answer

Log in or Sign up to
This widget could not be displayed.

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you