Classes being unloaded while needed

Discussion in 'Bukkit Help' started by ST-DDT, Mar 26, 2012.

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

    ST-DDT

    i develop a plugin and the depent-plugin classes are unloaded before the plugin is unloaded. so i got this error.
    Code:
    22:55:11 [SCHWERWIEGEND] Error occurred while disabling CrazyPromoter v1 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/platymuus/bukkit/permissions/Group
            at de.st_ddt.crazyutil.conditions.player.ConditionPlayerPermissionGroup.save(ConditionPlayerPermissionGroup.java:39)
            at de.st_ddt.crazyutil.conditions.ConditionList.save(ConditionList.java:47)
            at de.st_ddt.crazypromoter.Promotion.save(Promotion.java:65)
            at de.st_ddt.crazypromoter.CrazyPromoter.save(CrazyPromoter.java:67)
            at de.st_ddt.crazyplugin.CrazyPlugin.onDisable(CrazyPlugin.java:172)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
            at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:362)
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:399)
            at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:392)
            at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:245)
            at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:402)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.ClassNotFoundException: com.platymuus.bukkit.permissions.Group
            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)
            ... 13 more
    How do i fix this?

    CraftBukkit Version 2120
    Bukkit Version 1421
    Java 7 U3 64bit + Java 6 U18 32bit
     
  2. Offline

    flamedaces

    update crazypromoter....or remove it
     
  3. Offline

    ST-DDT

    Maybe i got you wrong or you me (german ist my nativ language), but all these Plugins are up to date. (I wrote every CrazyPlugin)
    BukkitPermissions 1.6
    CrazyCore, CrazyPromoter

    CrazyPromoter depends on BukkitPermissions & CrazyCore (listed in plugin-yml)

    btw it has no problems loading/creating the classes onEnable and ingame but it cannot access them onDisable.
    Do i have to reload the classes manually and unload them after disabling plugin?

    [EDIT: Maybe should be moved to Plugin Development]
     
  4. Offline

    jazaazma

    ST-DDT Hi, Did you ever find a fix for this? I am having the same problem where some of my classes are unloading before they're meant to on the onDisable(). Thanks in advance
     
  5. Offline

    ST-DDT

    Hi,

    this issue has been solved by Bukkit long ago.
    (By reverting plugin unload order and using some kind of fallback class loading)

    Can you describe your issue a little bit more in details?

    Crazy
     
  6. Offline

    jazaazma

    I am making a plugin where it changes the way furnaces works, you right click the furnace with the ore and it takes the ore then waits a certain amount of time (dependent on the quantity) then gives them back. The furnace data is in a different class and when the reload happens it goes through the classes data, and gives all the players back their items then. This is called in the onDisable() but when it goes to use the method, I get an error in the console saying java.lang.NoClassDefFoundError: me/jazaazma/RPG/Data/FurnaceData.
    Thanks
     
  7. Offline

    Shevchik

    You replaced the plugin jar when it was running?
     
  8. Offline

    ST-DDT

    Which Bukkit/CraftBukkit version are you using?
    Do use use the me.jazaazma.RPG.Data.FurnaceData somewhere else too?
    Does some plugin alter/touch the plugin.jar itself?
    Do you use it in onDisable() directly or do you use a scheduller or other thread for that?
    Is the class in your own plugin.jar or some other plugin's.jar?
    How do you access that class? Do you have an existing field/var or do you create a new instance or are you using reflection?
     
Thread Status:
Not open for further replies.

Share This Page