Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring REST has multiple occurrences of org.json.JSONObject on the class path #2968

Closed
GCHQDeveloper314 opened this issue Jun 8, 2023 · 0 comments · Fixed by #2969
Closed
Assignees
Labels
bug Confirmed or suspected bug dependencies Updates/changes to Maven or other dependencies
Milestone

Comments

@GCHQDeveloper314
Copy link
Member

Describe the bug
When running Spring REST tests the following message is seen:

[main] test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer WARN  - 

Found multiple occurrences of org.json.JSONObject on the class path:

	jar:file:/home/runner/.m2/repository/org/json/json/20211205/json-20211205.jar!/org/json/JSONObject.class
	jar:file:/home/runner/.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

This is only seen when testing. As explained in the message, the duplicate should be excluded 'to ensure predictable' behaviour in production.

To Reproduce
Run mvn clean install -Pcoverage -pl :spring-rest on the 2.0.0 release.

Expected behavior
Message above not seen.

@GCHQDeveloper314 GCHQDeveloper314 added bug Confirmed or suspected bug dependencies Updates/changes to Maven or other dependencies labels Jun 8, 2023
@GCHQDeveloper314 GCHQDeveloper314 added this to the v2.1.0 milestone Jun 8, 2023
@GCHQDeveloper314 GCHQDeveloper314 self-assigned this Jun 8, 2023
GCHQDeveloper314 added a commit that referenced this issue Jun 8, 2023
…on the class path (#2969)

* Exclude dependency which adds duplicate org.json.JSONObject to the class path

* Improve demo profile to run the demo always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed or suspected bug dependencies Updates/changes to Maven or other dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant