JSONObject["name"] not found

Bruno Junqueira Alves February 20, 2020

When I try to get details about my Jira projects, in the class JsonParseUtil, parseBasicUser method, the code look for the field "name" in the "reporter" group.

But my Json delivered doesn't contains it:

{
"self":"",
"accountId":"",
"emailAddress":"",
"avatarUrls":{
},
"displayName":"",
"active":,
"timeZone":"America\/Sao_Paulo",
"accountType":"atlassian"
}

 There's some update that removed the field?

13 answers

1 accepted

2 votes
Answer accepted
Venkata Bellamkonda February 22, 2020

For me issue got fixed by upgrading com.atlassian.jira:jira-rest-java-client-core to 5.2.0

Refer below link for details.

https://issues.jenkins-ci.org/browse/JENKINS-53794

Abdullah Akbar February 22, 2020

Thanks @Venkata Bellamkonda for the info. So nice of you! We will also upgrade now. 

Anji K February 24, 2020

After upgrading to 5.2.0, the issue got fixed. Thanks!

Bruno Junqueira Alves February 24, 2020

Thanks for the answer!!

John Ruck February 26, 2020

It looks like this fix is also needed for the Perforce P4DTG functionality (it looks like they repackage the above library so it cant just be dropped in).  Any chance Atlassian can contact them to get them to rebuild the tool (last build was in 2018)?

It fails now with a null pointer reference (probably to the missing Name field is my guess since it just started happening at the same time as this and the older P4DTG actually reports

Caused by: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)

newer p4dtg event viewer output

Faulting application name: p4dtg-repl.exe, version: 2018.1.169.9871, time stamp: 0x5b989296
Faulting module name: p4dtg-repl.exe, version: 2018.1.169.9871, time stamp: 0x5b989296
Exception code: 0xc0000005
Fault offset: 0x00000000000146eb
Faulting process id: 0x19d0
Faulting application start time: 0x01d5ec13fac5a9fd
Faulting application path: C:\Program Files\Perforce\P4DTG 64-bit\p4dtg-repl.exe
Faulting module path: C:\Program Files\Perforce\P4DTG 64-bit\p4dtg-repl.exe
Report Id: 6a539496-b755-4383-9192-6be0d35e9d44
Faulting package full name:
Faulting package-relative application ID:

4 votes
Wayne_Baldwin March 4, 2020

I am seeing a lot of people having issues with the name tag being removed from the JSON data and the only response from Atlassian being to upgrade to version 5.2. That doesn't help me or the other's using Eclipse and now being unable to use Jira in Eclipse anymore. We PAY for Jira and support of Eclipse seems pretty obvious to me. Can we please get some support for that?

Erica K March 10, 2020

The Atlassian Eclipse connector dates back to 2015 and does not officially support the latest Eclipse versions. I managed to get it to work anyway, only to have it break due to this change. I am not hopeful that Atlassian is going to help here.

Wayne_Baldwin March 10, 2020

They should TOTALLY support Eclipse as it is one of the most common tools used by software engineers. The fact that they don't gives me a very poor opinion of them as a provider of tools for engineers. How much work could it really take to avoid their clients being upset by this?

3 votes
Hans-Oliver Starrowsky February 20, 2020

Same for us. Mylyn Jira connector from eclipse worked well last week. Since yesterday same problems as described above.

Can somebody from Atlassian JIRA development have a look in it and provide a fix (Atlassian cloud as well)?

3 votes
Will Mulder February 20, 2020

And i get this: JSONObject["name"] not found from my JIRA connector for Eclipse which worked just fine until yesterday....

com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.


Atlassian Connector for Eclipse
3.2.5.v20150427

Eclipse
Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500




eclipse.buildId=4.6.3.M20170301-0400
java.version=1.8.0_201
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.javascript.product -product org.eclipse.epp.package.javascript.product -product org.eclipse.epp.package.javascript.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.javascript.product -product org.eclipse.epp.package.javascript.product -data file:/C:/Users/willem.mulder/workspace/ -product org.eclipse.epp.package.javascript.product

com.atlassian.connector.eclipse.internal.jira.core
Error
Thu Feb 20 13:46:15 GMT 2020
com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.

com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:790)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.getIssues(JiraRestClientAdapter.java:315)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.findIssues(JiraClient.java:368)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.search(JiraClient.java:757)
at com.atlassian.connector.eclipse.internal.jira.core.JiraRepositoryConnector.performQuery(JiraRepositoryConnector.java:140)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQuery(SynchronizeQueriesJob.java:311)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQueries(SynchronizeQueriesJob.java:268)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.run(SynchronizeQueriesJob.java:199)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:783)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.getIssue(JiraRestClientAdapter.java:248)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.access$3(JiraRestClientAdapter.java:247)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$5.call(JiraRestClientAdapter.java:325)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$5.call(JiraRestClientAdapter.java:1)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:746)
... 8 more
Caused by: com.atlassian.jira.rest.client.RestClientException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:89)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.getAndParse(AbstractJerseyRestClient.java:106)
at com.atlassian.jira.rest.client.internal.jersey.JerseyIssueRestClient.getIssue(JerseyIssueRestClient.java:133)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$3.call(JiraRestClientAdapter.java:250)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$3.call(JiraRestClientAdapter.java:1)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:746)
... 13 more
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:169)
at com.atlassian.jira.rest.client.internal.json.BasicUserJsonParser.parse(BasicUserJsonParser.java:26)
at com.atlassian.jira.rest.client.internal.json.BasicUserJsonParser.parse(BasicUserJsonParser.java:23)
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.getOptionalField(IssueJsonParser.java:351)
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:266)
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:90)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient$1.call(AbstractJerseyRestClient.java:111)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:68)
... 18 more



Jonatan Villen February 20, 2020

Edit (duplicated message in topic)

1 vote
vladimir.uspenskiy February 20, 2020

So what is the plan for people who used the Java library published by Atlassian?

(https://mvnrepository.com/artifact/com.atlassian.jira/jira-rest-java-client-core)

1 vote
Reinhard Jeschull February 20, 2020

Same here with access to cloud version.

Caused by: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:405) ~[jettison-1.3.7.jar!/:1.3.7]
at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:541) ~[jettison-1.3.7.jar!/:1.3.7]
at com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:192) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.UserJsonParser.parse(UserJsonParser.java:34) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.UserJsonParser.parse(UserJsonParser.java:31) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.getOptionalNestedField(IssueJsonParser.java:300) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:234) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:88) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.GenericJsonArrayParser.parse(GenericJsonArrayParser.java:39) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.SearchResultJsonParser.parse(SearchResultJsonParser.java:40) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.SearchResultJsonParser.parse(SearchResultJsonParser.java:27) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$1.handle(AbstractAsynchronousRestClient.java:148) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$3.apply(AbstractAsynchronousRestClient.java:189) ~[jira-rest-java-client-core-5.1.6.jar!/:na]
... 15 common frames omitted
Mena Reddington February 27, 2020

I am experiencing the same issue with Smartsheets Jira Connector. Our Jira is cloud hosted. Do I need to ask Smartsheets to make changes to their API??

1 vote
Jonatan Villen February 20, 2020

Hi, I have the same problem since this morning from my jira connector in java application:

com.atlassian.jira.rest.client.api.RestClientException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.claim(DelegatingPromise.java:45) ~[jira-rest-java-client-core-5.1.6.jar:na]
at com.tims.jira.server.services.JiraServiceImpl.getJiraIssues(JiraServiceImpl.java:583) ~[classes/:na]
at com.tims.jira.server.subtasks.ScheduledConfiguration.lambda$job$0(ScheduledConfiguration.java:73) ~[classes/:na]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93) [spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_211]

What I can do?

Thanks!

1 vote
Jonatan Villen February 20, 2020

The problem is the same with:

com.atlassian.jira:jira-rest-java-client-core:5.1.6

 Regards

Venkata Bellamkonda February 22, 2020

Upgrade 

com.atlassian.jira:jira-rest-java-client-core to 5.2.0

 Refer https://issues.jenkins-ci.org/browse/JENKINS-53794

Jonatan Villen February 24, 2020

I have upgraded the version and works fine.

 

Thanks!! 

Hans-Oliver Starrowsky April 6, 2020

Our problem here is the Atlassian connector for Mylyn. The version here is "jira-rest-java-client-1.1-ide-m09.jar" - provided I've picked the correct one. Some of the file/class structure in there are similar to the contents of "jira-rest-java-client-core-5.2.0.jar".

In a fit of madness, I copied the core-5.2.0 classes into the 1.1-ide-m09.jar - replacing all classes with the same name. Result: the error "JSONObject["name"] not found" had gone, but the Mylyn connector still wasn't able to get the Jira issues as tasks.

So my question is: Where can we get a operational version of the Mylyn connector to Jira that is based on the JRJC core 5.2.0?

Editing code and fixing the code of the Mylyn connector is unfortunately no option for me.

Like Mike Fechner likes this
0 votes
Will Mulder April 6, 2020

Hi, did anybody find a way forward - connecting Eclipse to Jira with task focus etc?

Wayne_Baldwin April 6, 2020

Atlassian provide a solution for their product to work with Eclipse, the most popular development tool? Surely you jest.

Will Mulder April 6, 2020

@Wayne_Baldwin Hi Wayne, wish I was jesting. A couple of months back the Atlassian Jira Connector for Eclipse stopped working due to this issue: com.atlassian.jira.rest.client.api.RestClientException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.

:(

Wayne_Baldwin April 6, 2020

I was being sarcastic. Read up above back on March 4th or so. Atlassian SHOULD provide a plugin for Eclipse and keep it supported as they keep changing their servers like they just did breaking the only functioning option left.

Like Mike Fechner likes this
Will Mulder April 6, 2020

@Wayne_Baldwin Sorry, missed that .... So we soldier on and no amount of complaining will get them to do anything right...?

aprato November 25, 2020

Hello All,

there are any chance to have Eclipse MyLyn working connector?

Like # people like this
Balázs Palcsó November 27, 2020

+1 for fixing Eclipse Mylyn JIRA connector

Like Mike Fechner likes this
0 votes
Anji February 22, 2020

@JIRA Team : Could you please provide the ETA to fix this issue? Our Integrations got broken with JIRA. Any help would be greatly appreciated. Thanks in advance! 

we are using 

com.atlassian.jira:jira-rest-java-client-core:5.1.6
0 votes
Abdullah Akbar February 22, 2020

Hi folks,

Our integration functionality also broke yesterday with the same exception -

com.atlassian.jira.rest.client.api.RestClientException: org.codehaus.jettison.json.JSONException: JSONObject["name"] not found.

Can someone from the Atlassian JIRA dev team please fix this at the earliest... Thanks in advance!

0 votes
Cameron Kruse February 21, 2020

Hi,

We make use of the following as well and it is a breaking change for our internal tool.

com.atlassian.jira:jira-rest-java-client-core:5.1.6

We would much rather not have to build our own custom api client for this.

Is there a possible simple fix or workaround for this?

0 votes
Eitan Schleissner February 20, 2020

Hi,

I believe this is related to the deprecation of the field name and id - have a look at the below article: 

https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/

We ran into this issue yesterday and have adjusted to use accountId going forward.

Suggest an answer

Log in or Sign up to answer