JDOM ClassNotFoundException

Discussion in 'Plugin Development' started by Hahaha466, Jul 25, 2013.

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

    Hahaha466

    I think it has something to do with the way that I imported JDOM, but I can not for the life of me figure out how to fix it.
    [​IMG]
    And here is the server.log:
    Code:
    [SEVERE] Could not pass event EntityTameEvent to Animal Guard v0.1
    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.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
        at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEntityTameEvent(CraftEventFactory.java:256)
        at net.minecraft.server.v1_6_R2.EntityWolf.a(EntityWolf.java:252)
        at net.minecraft.server.v1_6_R2.EntityInsentient.c(EntityInsentient.java:794)
        at net.minecraft.server.v1_6_R2.EntityHuman.p(EntityHuman.java:810)
        at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:1107)
        at net.minecraft.server.v1_6_R2.Packet7UseEntity.handle(SourceFile:36)
        at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296)
        at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116)
        at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
        at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30)
        at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590)
        at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226)
        at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
        at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
        at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
    Caused by: java.lang.NoClassDefFoundError: org/jdom2/JDOMException
        at com.hahaha466.animalguard.TameListener.onEntityTamed(TameListener.java:22)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
        ... 18 more
    Caused by: java.lang.ClassNotFoundException: org.jdom2.JDOMException
        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.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)
        ... 24 more
    I've been trying for an hour in an attempt to resolve this and I can't figure out what to do. Can you help?

    The error does NOT happen on server load. It happens when I listen to the EntityTamedEvent and/or use JDOM to create an HTML file.
     
  2. Offline

    techboy291

    Yeah, same here. I think it might have something to do with JDOM's version, but I've tried to use 1.1.3 instead of 2.0.5 and I still get the same exception.
     
  3. Offline

    Saposhiente

    You will need to include the library as an embedded dependency, as in, you put the library's files inside of your plugin jar. Otherwise, if no copy of the library is present on the server's classpath, it will be unable to find the library.
     
    techboy291 likes this.
Thread Status:
Not open for further replies.

Share This Page