Page 1 of 1

java.lang.NoClassDefFoundError: org/json/JSONObject error

Posted: 14 May 2022, 14:23
by luciddream
Hi. I get this error when using JSONObject in runtime but the json lib is added to my intellij project and it is compiled, built and finally generated jar extension correctly.

java.lang.NoClassDefFoundError: org/json/JSONObject


java.lang.NoClassDefFoundError: org/json/JSONObject
development.requestHandlers.GetRankRequestHandler.handleClientRequest(GetRankRequestHandler.java:37)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:208)
com.smartfoxserver.v2.controllers.v290.ExtensionReqController.processRequest(ExtensionReqController.java:174)
com.smartfoxserver.v2.controllers.v290.ExtensionReqController$1.run(ExtensionReqController.java:68)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

Re: java.lang.NoClassDefFoundError: org/json/JSONObject error

Posted: 15 May 2022, 06:39
by Lapo
Hi,
the library also needs to be copied in the SFS2X/extensions/__lib__/ folder. So that it can be loaded at runtime.
Cheers

Re: java.lang.NoClassDefFoundError: org/json/JSONObject error

Posted: 13 Mar 2023, 02:48
by richardferrym
Hi,
the library also needs to be copied in the SFS2X/extensions/__lib__/ folder google account manager apk. So that it can be loaded at runtime.
Cheers


finally get the solution here for my issue, thanks