Factions Error

Discussion in 'Plugin Development' started by vtg_the_kid, Aug 2, 2015.

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

    vtg_the_kid

    Hi All,

    I get the following error when starting my server with Factions (https://github.com/drtshock/Factions)

    Code:
    java.lang.NoClassDefFoundError: com/google/gson/reflect/TypeToken
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_45]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[?:1.8.0_45]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_45]
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[?:1.8.0_45]
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_45]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[?:1.8.0_45]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[?:1.8.0_45]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_45]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[?:1.8.0_45]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:193) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:73) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_45]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_45]
        at com.massivecraft.factions.P.getGsonBuilder(P.java:133) ~[?:?]
        at com.massivecraft.factions.zcore.MPlugin.preEnable(MPlugin.java:86) ~[?:?]
        at com.massivecraft.factions.P.onEnable(P.java:65) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:327) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:341) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:313) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:725) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.Bukkit.reload(Bukkit.java:543) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:625) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchServerCommand(CraftServer.java:611) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.DedicatedServer.aM(DedicatedServer.java:320) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:285) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:609) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:517) [craftbukkit.jar:git-Bukkit-33d5de3]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
    Caused by: java.lang.ClassNotFoundException: com.google.gson.reflect.TypeToken
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_45]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_45]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_45]
        ... 34 more
    [10:36:37] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    I cloned this guy's repository, and attempted to recompile it. (This is for a private server, and I'm doing this so I can edit the plugin)
    I added some stuff into my build path to remove compile errors:
    [​IMG]
    I did not change the source code at all. How would I fix this error? Thanks.
     
  2. Offline

    Gater12

    @vtg_the_kid
    Taking a look, it uses other dependencies, which are shaded in using Maven.

    Try building it with Maven?
     
  3. Offline

    vtg_the_kid

    @Gater12
    Thanks for looking :)

    I'm sorry, but how would I build something with Maven? I converted the project to a Maven project, but it doesn't seem to help. Where can I find the shaded dependencies?
     
  4. Offline

    Zombie_Striker

    This is your problem. Do you have a plugin that has the path listed above? If not, that is your problem.

    To solve this, most likely you can go to the plugins download page and see what are it's dependencies.
     
  5. Offline

    vtg_the_kid

  6. Offline

    Zombie_Striker

    @vtg_the_kid
    Unless you made a class with that path with all relevant data that the main plugin needed(or you just download the plugin/class that the plugin needs AS INTENDED), putting text into a file will do nothing.
     
  7. Offline

    vtg_the_kid

    @Zombie_Striker
    What did I do wrong? I think I downloaded the right plugin that Factions needs
     
Thread Status:
Not open for further replies.

Share This Page