DuplicateJsonObjectContextCustomizer object

can anyone tell me how to exclude it i am new
Found multiple occurrences of org.json.JSONObject on the class path:

jar:file:/C:/Users/ashir/.m2/repository/org/json/json/20250517/json-20250517.jar!/org/json/JSONObject.class
jar:file:/C:/Users/ashir/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class
You may wish to exclude one of them to ensure predictable runtime behavior
Found multiple occurrences of org.json.JSONObject on the class path:

jar:file:/C:/Users/ashir/.m2/repository/org/json/json/20250517/json-20250517.jar!/org/json/JSONObject.class
jar:file:/C:/Users/ashir/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class
You may wish to exclude one of them to ensure predictable runtime behavior
28 Replies
JavaBot
JavaBot3w ago
This post has been reserved for your question.
Hey @ASHٴ! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st3w ago
Are you using Maven or Gradle? Currently, you have different dependencies that bring in both org.json:json:jar:20250517 and com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1 which have the same code/are in conflict with each other You can probably exclude the vaadin one
ASHٴ
ASHٴOP3w ago
maven
dan1st
dan1st3w ago
Can you show your pom.xml? and the output of mvn dependency:tree In the dependency causing the issue, you can probably do something like the following:
<dependency>
...
<exclusions>
<exclusion>
<groupid>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
...
<exclusions>
<exclusion>
<groupid>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>
ASHٴ
ASHٴOP3w ago
dan1st
dan1st3w ago
Can I see the output of mvn dependency:tree? That should show that android-json somewhere Alternatively, you can probably fix it by just removing
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20250517</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20250517</version>
</dependency>
but to be honest, I'd rather exclude the other one
ASHٴ
ASHٴOP3w ago
ASHٴ
ASHٴOP3w ago
i think i used this somewhere so warning came other one not using
dan1st
dan1st3w ago
ok You have this:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
Replace it by
<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>
<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>
ASHٴ
ASHٴOP3w ago
ok
dan1st
dan1st3w ago
because that's where the problematic dependency comes from:
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:3.5.7:test // LEVEL 1 - direct dependency
[INFO] | +- org.springframework.boot:spring-boot-test:jar:3.5.7:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:3.5.7:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.9.0:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.4:runtime
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:2.1.4:runtime
[INFO] | +- net.minidev:json-smart:jar:2.5.2:test
[INFO] | | \- net.minidev:accessors-smart:jar:2.5.2:test
[INFO] | | \- org.ow2.asm:asm:jar:9.7.1:test
[INFO] | +- org.assertj:assertj-core:jar:3.27.6:test
[INFO] | +- org.awaitility:awaitility:jar:4.2.2:test
[INFO] | +- org.hamcrest:hamcrest:jar:3.0:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.12.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.12.2:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | | | +- org.junit.platform:junit-platform-commons:jar:1.12.2:test
[INFO] | | | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.12.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.12.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.12.2:test
[INFO] | +- org.mockito:mockito-core:jar:5.17.0:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.17.8:test
[INFO] | | \- org.objenesis:objenesis:jar:3.3:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:5.17.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.3:test // LEVEL 2 - transitive dependency
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test // LEVEL 3 - transitive problematic dependency
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:3.5.7:test // LEVEL 1 - direct dependency
[INFO] | +- org.springframework.boot:spring-boot-test:jar:3.5.7:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:3.5.7:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.9.0:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.4:runtime
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:2.1.4:runtime
[INFO] | +- net.minidev:json-smart:jar:2.5.2:test
[INFO] | | \- net.minidev:accessors-smart:jar:2.5.2:test
[INFO] | | \- org.ow2.asm:asm:jar:9.7.1:test
[INFO] | +- org.assertj:assertj-core:jar:3.27.6:test
[INFO] | +- org.awaitility:awaitility:jar:4.2.2:test
[INFO] | +- org.hamcrest:hamcrest:jar:3.0:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.12.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.12.2:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | | | +- org.junit.platform:junit-platform-commons:jar:1.12.2:test
[INFO] | | | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.12.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.12.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.12.2:test
[INFO] | +- org.mockito:mockito-core:jar:5.17.0:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.17.8:test
[INFO] | | \- org.objenesis:objenesis:jar:3.3:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:5.17.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.3:test // LEVEL 2 - transitive dependency
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test // LEVEL 3 - transitive problematic dependency
so you can exclude the transitive dependency causing the issue
ASHٴ
ASHٴOP3w ago
No description
dan1st
dan1st3w ago
oh I probably made a typo yeah, it should be groupId, not groupid I updated the message from before
ASHٴ
ASHٴOP3w ago
oh ok np fixed
dan1st
dan1st3w ago
Then you can try running mvn clean verify to see whether it worked ;)
ASHٴ
ASHٴOP3w ago
2025-11-17T21:30:25.321+05:30 WARN 8564 --- [ restartedMain] org.hibernate.orm.deprecation : HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) should i remove it
dan1st
dan1st3w ago
the warning tells you you don't need it so yes, you can remove it
JavaBot
JavaBot3w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Madjosz
Madjosz2w ago
But you are not allowed to do evil things with that one...
dan1st
dan1st2w ago
What if I am evil? Anyway, it would also be possible to use the enforcer plugin to ensure the dependency isn't there
Madjosz
Madjosz2w ago
Well technically the android-vaadin library is just a fork of the org.json from 2013 with a standard license and all bugs actually tested, while org.json started to actually fix these bug in recent years.
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
ASHٴ
ASHٴOP2w ago
2025-11-19T06:49:52.759+05:30 WARN 4244 --- [-10:housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-10 - Thread starvation or clock leap detected (housekeeper delta=6h17m41s489ms239µs400ns). @dan1st | Daniel do u know about this
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
dan1st
dan1st2w ago
Did this happen on a laptop or a server? @JavaBot is getting these every time I'm doing updates lol This is likely due to you suspending a laptop or similar - and the program continuing 6h later or maybe it could be something about your code bring in an endless loop or something blocking forever- if this happens on a server, create a thread dump also it can happen when changing your system time or maybe timezone maybe also if you are somehow manually obtaining DB connections and not releasing them
ASHٴ
ASHٴOP2w ago
Yes my laptop throw this log
dan1st
dan1st2w ago
then it's probably just that - you suspended it, turned it on again and then it detected that the clock suddenly jumped by 6h
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?