Solved Throwing NoClassDefFoundError!

Discussion in 'Plugin Development' started by Blockhead7360, Apr 15, 2016.

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

    Blockhead7360

    Hello! I recently made a plugin that uses NoteBlockAPI.

    However, everytime I start the server, it says this:
    Console Error (open)

    Code:
    Could not load 'plugins/DIRadio.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: com/xxmicloxx/NoteBlockAPI/SongPlayer
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77]
    Caused by: java.lang.NoClassDefFoundError: com/xxmicloxx/NoteBlockAPI/SongPlayer
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_77]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_77]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        ... 6 more
    Caused by: java.lang.ClassNotFoundException: com.xxmicloxx.NoteBlockAPI.SongPlayer
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_77]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_77]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_77]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        ... 6 more
    


    I do have NoteBlockAPI installed on my server, and imported into the build path of my project. I did /plugins, and NoteBlockAPI was listed in green. I don't know why it isn't working! Can anyone help me please?

    Thanks,
    - Blockhead7360

    IMPORTANT EDIT: Okay, for some reason, now the plugin works. I don't even know how it fixed. I just restarted my server a couple of times and it's up and running!
     
    Last edited: Apr 15, 2016
  2. Offline

    Zombie_Striker

    Importing it to the build path means that that plugin is a dependency, meaning it needs that plugin in order to work. You must have it installed on your server to use it's methods.
     
  3. Offline

    Blockhead7360


    I do have it installed on my server, as I said earlier. I just don't understand why it still can't find the class even though the plugin is running correctly on the server (it is green when I do /plugins)
     
Thread Status:
Not open for further replies.

Share This Page