NoSuchMethod size() in List<Object>?

Discussion in 'Plugin Development' started by NeatMonster, Dec 27, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    NeatMonster

    Hey everybody,

    For the SpaceBukkit project, I use the a library called JSON.simple.

    Some of my users have this error:
    Code:
    java.lang.NoSuchMethodError: org.json.JSONArray.size()I
    at me.neatmonster.spacebukkit.utilities.Utilities.getBukkitDevName(Utilities.java:294)
    at me.neatmonster.spacebukkit.utilities.Checker.run(Checker.java:21)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Lines 293/294 of Utilities.java:
    Code:
    JSONArray resultJSONArray = (JSONArray) JSONValue.parse(result);
    if (resultJSONArray.size() == 0 || resultJSONArray.size() > 1)
    Let's see the first line of JSONArray.java:
    Code:
    public class JSONArray extends ArrayList<Object> implements List<Object>, JSONAware, JSONStreamAware {
    I can't figure out why this error is occurring. The method size() of List<Object> should be included in Java, right?

    Amicably, NeatMonster.
     
  2. Offline

    halley

    Some of your users-- do you include the JSON library and are you sure they're using the same library you are?

    Edit: I see an org.json.simple.JSONArray class on your linked library page, but no org.json.JSONArray class.
     
  3. Offline

    NeatMonster

    [​IMG]

    I'm also sure the files are included in the final .JAR.
    I renamed it, cf. screenshot.​
    Edit: I've finally found the issue. Minequery was using the same package name as me, but not the same library. Anyways, thanks for you help @halley.​
     
Thread Status:
Not open for further replies.

Share This Page