java.lang.NoSuchMethodError: org.json.JSONObject.putOnce(...

See original GitHub issue

I can retrieve Users, Projects, Issues etc… but when I try to insert a new Issue:

Issue issue  = IssueFactory.create(projectTest.getId, "Test INSERT")
issueManager.createIssue(issue)

i get:

18:10:13.740 [http-nio-8080-exec-10] WARN  com.bqn.backoffice.redmine - Issue [id=null, subject=Test de INSERT]
java.lang.NoSuchMethodError: org.json.JSONObject.putOnce(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    at org.json.JSONWriter.key(JSONWriter.java:210) ~[json-20090211.jar:0.0.20131108.vaadin1]
    at com.taskadapter.redmineapi.internal.RedmineJSONBuilder.toSimpleJSON(RedmineJSONBuilder.java:220) ~[redmine-java-api-2.4.0.jar:na]
    at com.taskadapter.redmineapi.internal.Transport.addObject(Transport.java:220) ~[redmine-java-api-2.4.0.jar:na]
    at com.taskadapter.redmineapi.IssueManager.createIssue(IssueManager.java:173) ~[redmine-java-api-2.4.0.jar:na]

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cuducommented, Mar 28, 2019

this code will help u

<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>com.vaadin.external.google</groupId>
          <artifactId>android-json</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
1reaction
alexeyOnGitHubcommented, Oct 19, 2015

it may be helpful to other developers if you provide a brief description on how you identified the duplicate jar…

Read more comments on GitHub >

github_iconTop Results From Across the Web

8 - Stack Overflow
I'm running unit tests with mockito and one of the endpoints uses JSONObject.put and was giving me the no such method error.
Read more >
lscsclient - java.lang.NoSuchMethodError: org.json ...
But, when I run this code, it gives me following error. Error: Exception in thread "main" java.lang.NoSuchMethodError: org.json.JSONObject.
Read more >
JSONObject
A JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces with colons between the...
Read more >
java - iTecNote
firebasejavajson. I have faced an Error. java.lang.NoSuchMethodError. org.json.JSONObject.putOnce(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
Read more >
Uses of Class org.json.JSONObject - Javadoc.io
JSONObject, JSONObject. putOnce(java.lang.String key, java.lang.Object value). Put a key/value pair in the JSONObject, but only if the key and the value are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found