CmdrDats / clj-minecraft

Clojure Bukkit plugin, Minecraft.
74 stars 35 forks source link

Plugin refuses to load. #47

Closed zackp30 closed 10 years ago

zackp30 commented 10 years ago
[16:53:18 ERROR]: Could not load 'plugins/cljminecraft-1.0.6-SNAPSHOT-standalone.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `cljminecraft.ClojurePlugin'
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:42) ~[spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:314) ~[spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:236) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.java:355) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:135) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:437) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
Caused by: java.lang.ClassNotFoundException: cljminecraft.ClojurePlugin
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[?:1.7.0_25]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[?:1.7.0_25]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_25]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.7.0_25]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.7.0_25]
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_25]
        at java.lang.Class.forName(Class.java:270) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1328]
        ... 7 more
zackp30 commented 10 years ago

Heh, was using outdated lein version (newbie to Clojure...).

raould commented 6 years ago

hi, I am new to all this. I am on Ubuntu 16.04 64bit and did "sudo apt-get install leiningen" and did "lein uberjar" to get the cljminecraft-1.0.6-SNAPSHOT-standalone.jar file and put it into my ~/Bin/Minecraft/plugins directory, and then relaunched spigot (tried with both 1.12.1, and 1.12.2) inside ~/Bin/Minecraft. I got what appears to be a very similar error (see below). Then I tried "lein upgrade" and of course it told me:

$ lein upgrade
Upgrades should be done using apt rather than Leiningen itself.

the terrible terror:

This server is running CraftBukkit version git-Spigot-109b080-ab09b27 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
[20:49:26 ERROR]: Could not load 'plugins/cljminecraft-1.0.6-SNAPSHOT-standalone.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `cljminecraft.ClojurePlugin'
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:80) ~[spigot-1.12.2.jar:git-Spigot-109b080-ab09b27]

fwiw

$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
raould commented 6 years ago

[solved] Ok, apparently I had to get the raw "lein" script from https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein and then chmod +x it and put it into my path and sudo apt-get remove leiningen and then rebuild, I guess the apt lein was 1.x and the new lein is 2.x. The cljminecraft-1.0.6-SNAPSHOT-standalone.jar ended up in clj-minecraft/target/ and then I coped that over to my ~/Bin/Minecraft/plugins and restarted the spigot server and the error went away. Hopefully this will make sense to other clueless n00bs like I once was...