Home > database >  (org.json.simple.JSONObject and org.json.JSONObject are in unnamed module of loader 'app'
(org.json.simple.JSONObject and org.json.JSONObject are in unnamed module of loader 'app'

Time:01-23

java.lang.ClassCastException: class org.json.simple.JSONObject cannot be cast to class org.json.JSONObject (org.json.simple.JSONObject and org.json.JSONObject are in unnamed module of loader 'app') hre the code

1

expected to find name obj from json file

CodePudding user response:

this type Exception it's come from conflit dependecy or.json and org.json.simple remove org.json

enter code <dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>

and just keep

enter code <groupId>com.googlecode.json-simple</groupId>

and it become well

  • Related