Random ClassNotFoundEcxeption Error... Again...

Discussion in 'Plugin Development' started by thepaperboy99, Nov 9, 2013.

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

    thepaperboy99

    Hello Bukkit, I posted a thread awhiel ago, and I resolved that, but now, another one came back. I have no idea what happens here, one export it works. then I export again and change nothing where the error is happening, and it pops up the "ClassNotFoundException error". Im just really confused on how this is happeneing, and really need help.

    Error:

    Code:
    19:10:50 [SEVERE] Error occurred while disabling FreeForAll v1.0 (Is it up to da
    te?)
    java.lang.NoClassDefFoundError: me/thepaperboy99/freeforall/utils/ScoreBoards
    at me.thepaperboy99.freeforall.FreeForAll.onDisable(FreeForAll.java:302)
     
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:219)
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoade
    r.java:481)
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManag
    er.java:400)
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginMana
    ger.java:393)
    at org.bukkit.plugin.SimplePluginManager.clearPlugins(SimplePluginManage
    r.java:434)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.reload(CraftServer.java:58
    5)
    at org.bukkit.Bukkit.reload(Bukkit.java:277)
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:
    23)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:19
    2)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchCommand(CraftServe
    r.java:528)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchServerCommand(Craf
    tServer.java:515)
    at net.minecraft.server.v1_6_R3.DedicatedServer.as(DedicatedServer.java:
    263)
    at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:2
    28)
    at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:4
    88)
    at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java
    :421)
    at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:5
    83)
    Caused by: java.lang.ClassNotFoundException: me.thepaperboy99.freeforall.utils.S
    coreBoards
    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.findClass0(PluginClassLoader
    .java:80)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:53)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 17 more
    Line 302 on the onDisable method:

    Code:
    ScoreBoards.getInstance().removeScoreborad(player);
    The removeScoreboard method:

    Code:
     public void removeScoreborad(Player player){
    ScoreboardManager manager = Bukkit.getScoreboardManager();
    player.setScoreboard(manager.getNewScoreboard());
    }
    Other notes:
    - I already tried making another project and copyied the code
    - When I got the error, the server was running for a while and had 2 minecrafts open (may have caused that, but not sure)
    - Any way to prevent it from happening again?

    Thanks!
     
  2. Offline

    MrSparkzz

    thepaperboy99
    You need to select all your classes for export. In eclipse it'll only autoselect the ones you've changed since the last export.
     
  3. Offline

    thepaperboy99


    Is there a setting in the little export page? Like a checkbox I need to select all classes?
     
  4. Offline

    MrSparkzz

    thepaperboy99
    You can create Jardescription files that you can just double click to export your plugin. To make one do this:

    Right Click Project > Export > Jar File > Select your Plugin (go through and check everything you want) > Next > Check "Save the description of this JAR in the workspace" > Description file "/PluginName/PluginName Export.jardesc"

    This will create a jardescription file that you can just double click from within eclipse to export your project.
     
  5. Offline

    thepaperboy99

    Thanks! Now this will export every file right?
     
  6. Offline

    MrSparkzz

  7. Offline

    thepaperboy99

    What would be the setting to do that? Sorry for asking so many questions
     
  8. Offline

    MrSparkzz

  9. Offline

    thepaperboy99

    You said eclipse auto selects the ones you have changed, is there a way to export all of the files even though they were untouched?
     
  10. Offline

    MrSparkzz

    thepaperboy99
    Oh, when you export using the JarDescription file it'll export all the ones you had selected the last time you exported (In your case probably all of them).
     
  11. Offline

    thepaperboy99

    Oh, ok thanks! This really helped me alot!
     
Thread Status:
Not open for further replies.

Share This Page