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

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

luciddream
Posts: 1
Joined: 14 May 2022, 14:17

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

Postby luciddream » 14 May 2022, 14:23

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)
User avatar
Lapo
Site Admin
Posts: 22430
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Postby Lapo » 15 May 2022, 06:39

Hi,
the library also needs to be copied in the SFS2X/extensions/__lib__/ folder. So that it can be loaded at runtime.
Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 10 guests