Errors

Discussion in 'Plugin Development' started by Jazed, Mar 13, 2013.

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

    Jazed

    Hi,

    I am getting these errors, any idea? They render the plugin dead.

    Code:
     
    2013-03-13 23:00:58 [SEVERE] Could not pass event PlayerInteractEvent to SuperCraftBros v1.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
            at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
            at org.bukkit.craftbukkit.v1_4_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:178)
            at net.minecraft.server.v1_4_R1.PlayerInteractManager.dig(PlayerInteractManager.java:114)
            at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:564)
            at net.minecraft.server.v1_4_R1.Packet14BlockDig.handle(SourceFile:46)
            at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:290)
            at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:113)
            at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39)
            at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30)
            at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:598)
            at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224)
            at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
            at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
            at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
    Caused by: java.lang.NoClassDefFoundError: com/jazed/supercraftbros/classes/ClassHandler
            at com.jazed.supercraftbros.Game.giveItems(Game.java:749)
            at com.jazed.supercraftbros.Game.addPlayerToClass(Game.java:771)
            at com.jazed.supercraftbros.Events.SignClickEvent.clickHandler(SignClickEvent.java:56)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
            ... 17 more
     
    
     
  2. Offline

    Burnett1

    Need the code of class's

    com.jazed.supercraftbros.Game.giveItems LINE:749
    com.jazed.supercraftbros.Game.addPlayerToClass LINE:771
    com.jazed.supercraftbros.Events.SignClickEvent.clickHandler(SignClickEvent.java:56)
     
  3. Offline

    AlexLeporiday

    "Caused by: java.lang.NoClassDefFoundError: com/jazed/supercraftbros/classes/ClassHandler"
    "at com.jazed.supercraftbros.Game.giveItems(Game.java:749)"
    Googling the error "NoClassDefFoundError" gives this result http://javaeesupportpatterns.blogspot.co.uk/2012/06/javalangnoclassdeffounderror-how-to.html

    "This runtime error is thrown by the JVM when there is an attempt by a ClassLoader to load the definition of a Class (Class referenced in your application code etc.) and when such Class definition could not be found within the current ClassLoader tree."

    So now we know what the issue means, it means the java file is there when you're programming but when you compile it into a jar it's not there. The error is being caused by whatever is on line 749 of Game.java because that's what the stacktrace said.

    Now looking at it ClassHandler is a strange file to be missing so perhaps something went wrong when you compiled the program?

    Now while I can't solve this issue myself as I don't really know what's wrong what I've shown is it's important to learn as much as you can about an error as learning to troubleshoot your town problems is important. Looks like you might be missing a jar file in your build path that allows "giveItems" to work. You didn't supply any code in your main post so we've no way of helping directly.
     
    Jazed and Burnett1 like this.
  4. Offline

    Jazed

    I think it's a few settings going wrong with the compiling then as I have never had this issue before with this plugin, thanks.
     
Thread Status:
Not open for further replies.

Share This Page