java.lang.NoClassDefFoundError And really this is curious :P

Discussion in 'Plugin Development' started by p000ison, Jul 22, 2012.

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

    p000ison

    Heyho Community,

    I have a yeah major bug:

    I have this class: https://github.com/SacredCoding/Sim.../simpleclans/managers/SpoutPluginManager.java
    It contains simple spout features.

    And I call it here: https://github.com/SacredCoding/Sim...yrinth/phaed/simpleclans/SimpleClans.java#L85

    Now the curious thing:
    It throws a NoClassDefFoundError. If I remove the sendInfo() all works. So basically I do nothing if spout isnt found.

    Here is the exception:

    Code:
    14:30:53 [SEVERE] Error occurred while enabling SimpleClans v2.4 (Is it up to date?)
    java.lang.NoClassDefFoundError: org/getspout/spoutapi/gui/Screen
            at net.sacredlabyrinth.phaed.simpleclans.SimpleClans.onEnable(SimpleClans.java:85)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238)
            at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.ClassNotFoundException: org.getspout.spoutapi.gui.Screen
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 11 more
    Hm maybe ill move all this in another class....

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  2. Offline

    MuisYa

    I am having this error too sometimes when i enable my plugins on my server.
    Restarting the server helps, and solves the problem for me.

    It is really weird...

    My Server is using:
    Java 6
    Windows XP
     
  3. Offline

    p000ison

    I fixed it now by loading the class only if spout is installed.
     
Thread Status:
Not open for further replies.

Share This Page