gdude2002 / Python-Plugin-Loader

Python plugin loader for Bukkit
10 stars 3 forks source link

jython error #13

Closed botiapa closed 8 years ago

botiapa commented 8 years ago

When i start my server with the "pythonloader" plugin i get a error message,and my scripts won't work here is the error:

[12:18:48 INFO]: [PythonLoader] Loading PythonLoader v0.4.1
[12:18:48 INFO]: [PythonLoader] File found: C:\Users\Boti/.jython
[12:18:48 INFO]: [PythonLoader] If your Python plugins behave oddly, please make sure this file contains "python.security.respectJavaAccessibility = false".
[12:18:48 ERROR]: org/python/core/PyObject initializing PythonLoader v0.4.1 (Is it up to date?)
java.lang.NoClassDefFoundError: org/python/core/PyObject
        at com.master.bukkit.python.PythonLoader.onLoad(PythonLoader.java:71) ~[?:?]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.loadPlugins(CraftServer.java:299) [cb.jar:git-Bukkit-9856d8a]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.reload(CraftServer.java:723) [cb.jar:git-Bukkit-9856d8a]
        at org.bukkit.Bukkit.reload(Bukkit.java:548) [cb.jar:git-Bukkit-9856d8a]

        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [cb.jar:git-Bukkit-9856d8a]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) [cb.jar:git-Bukkit-9856d8a]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:625) [cb.jar:git-Bukkit-9856d8a]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchServerCommand(CraftServer.java:611) [cb.jar:git-Bukkit-9856d8a]
        at net.minecraft.server.v1_10_R1.DedicatedServer.aL(DedicatedServer.java:397) [cb.jar:git-Bukkit-9856d8a]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:361) [cb.jar:git-Bukkit-9856d8a]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:646) [cb.jar:git-Bukkit-9856d8a]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:550) [cb.jar:git-Bukkit-9856d8a]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]
Caused by: java.lang.ClassNotFoundException: org.python.core.PyObject
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[cb.jar:git-Bukkit-9856d8a]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[cb.jar:git-Bukkit-9856d8a]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_91]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_91]
        ... 13 more 

my server folder: screenshot

my plugin folder: screenshot

my lib folder: screenshot

plugins\login.py.dir folder (test script folder): screenshot

plugins\loigin.py.dir\login.py(test script):

print "main.py run"

@hook.enable
def onEnable():
    print "main.py enabled"

@hook.disable
def onDisable():
    print "main.py disabled"

@hook.event("player.PlayerJoinEvent", "normal")
def playerJoin(event):
    event.getPlayer().sendMessage("Hello from python")

@hook.command
def example(sender, command, label, args):
    sender.sendMessage("you just used command /example!")

plugins\login.py.dir\plugin.yml:

name: loginplugin
main: login.py
version: 0.1
gdude2002 commented 8 years ago

This plugin has been inactive for a long time; from what I recall @jomo was working on it, but it's been a while honestly.

jomo commented 8 years ago

Does this only happen with 1.10 or also previous versions?

botiapa commented 8 years ago

I have not tried earlier versions

botiapa commented 8 years ago

its not working on 1.9 neither

jomo commented 8 years ago

Hmm, you've seen these two lines?

[12:18:48 INFO]: [PythonLoader] File found: C:\Users\Boti/.jython
[12:18:48 INFO]: [PythonLoader] If your Python plugins behave oddly, please make sure this file contains "python.security.respectJavaAccessibility = false".
botiapa commented 8 years ago

https://botiapa.gyazo.com/275c276c2b6fc0cd0a74ccdb351c3c48

its in the file

botiapa commented 8 years ago

Idea? Something? I really want to make this work

jomo commented 8 years ago

Just tested with latest Spigot:

[17:20:14 INFO]: [PythonLoader] Enabling PythonLoader v0.4.0
[17:20:14 INFO]: Bukkit version format changed. Version not checked.
[17:20:14 INFO]: git-Spigot-c55900f-9856d8a (MC: 1.10)
[17:20:14 INFO]: 1.10-R0.1-SNAPSHOT

I don't have any issues. Which Java version are you using?

jomo commented 8 years ago

nvm that, apparently the latest release's download is actually 0.4.0 instead of 0.4.1. Will take a look at the differences

botiapa commented 8 years ago

k thanks

botiapa commented 8 years ago

java version:

https://botiapa.gyazo.com/6a3436480013d4c09980efc909e32a7b

jomo commented 8 years ago

heh, we both just made the same mistake of not building with gradle fatjar so dependencies were not included in the jar. I have updated the attached jar file in the 0.4.1 release.