Interface Not Visible from Class Loader
Closed this issue · 4 comments
I've started implementing jewelcli and I like it so far, but I've ran into an issue.
[10:12:19] [Server thread/WARN]: java.lang.IllegalArgumentException: interface com.graywolf336.jail.command.commands.jewels.Jailing is not visible from class loader
[10:12:19] [Server thread/WARN]: at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
[10:12:19] [Server thread/WARN]: at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewelcli.internal.fluentreflection.dynamicproxy.$FluentProxy.dynamicProxy(FluentProxy.java:23)
[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewelcli.internal.fluentreflection.bean.$MapBean.bean(MapBean.java:36)
[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.InterfaceArgumentPresentingStrategy.presentArguments(InterfaceArgumentPresentingStrategy.java:33)
[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.ArgumentPresenterImpl.presentArguments(ArgumentPresenterImpl.java:63)
[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.AbstractCliImpl.parseArguments(AbstractCliImpl.java:42)
[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.CliFactory.parseArguments(CliFactory.java:67)
[10:12:19] [Server thread/WARN]: at com.graywolf336.jail.command.subcommands.JailCommand.execute(JailCommand.java:62)
[10:12:19] [Server thread/WARN]: at com.graywolf336.jail.command.JailHandler.parseCommand(JailHandler.java:124)
[10:12:19] [Server thread/WARN]: at com.graywolf336.jail.JailMain.onCommand(JailMain.java:121)
[10:12:19] [Server thread/WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[10:12:19] [Server thread/WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:196)
[10:12:19] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:546)
[10:12:19] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:533)
[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:309)
[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:274)
[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540)
[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446)
[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)
Any ideas on this as right now I'm clueless?
This might be a difficult one to sort out as it is probably related to how
your container is behaving. I am not familiar with the minecraft server.
However it is possible that this is a bug in JewelCli - I had not
considered the case of someone using it in a server with isolated
classloaders.
The error says, I think, that the classloader that loaded the .class that
you passed into CliFactory is not the same as the classloader available via
Thread.currentThread().getContextClassLoader().
I may be able to fix it by using the classloader of your interface to
create the dynamic proxy instead. Let me try to build a new version for
you...
On Wed, Feb 12, 2014 at 4:24 PM, Bradley Hilton notifications@github.comwrote:
I've started implementing jewelcli and I like it so far, but I've ran into
an issue.[10:12:19] [Server thread/WARN]: java.lang.IllegalArgumentException: interface com.graywolf336.jail.command.commands.jewels.Jailing is not visible from class loader[10:12:19] [Server thread/WARN]: at java.lang.reflect.Proxy.getProxyClass(Unknown Source)[10:12:19] [Server thread/WARN]: at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewelcli.internal.fluentreflection.dynamicproxy.$FluentProxy.dynamicProxy(FluentProxy.java:23)[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewelcli.internal.fluentreflection.bean.$MapBean.bean(MapBean.java:36)[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.InterfaceArgumentPresentingStrategy.presentArguments(InterfaceArgumentPresentingStrategy.java:33)[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.ArgumentPresenterImpl.presentArguments(ArgumentPresenterImpl.java:63)[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.AbstractCliImpl.parseArguments(AbstractCliImpl.java:42)[10:12:19] [Server thread/WARN]: at com.lexicalscope.jewel.cli.CliFactory.parseArguments(CliFactory.java:67)[10:12:19] [Server thread/WARN]: at com.graywolf336.jail.command.subcommands.JailCommand.execute(JailCommand.java:62)[10:12:19] [Server thread/WARN]: at com.graywolf336.jail.command.JailHandler.parseCommand(JailHandler.java:124)[10:12:19] [Server thread/WARN]: at com.graywolf336.jail.JailMain.onCommand(JailMain.java:121)[10:12:19] [Server thread/WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)[10:12:19] [Server thread/WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:196)[10:12:19] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:546)[10:12:19] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:533)[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:309)[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:274)[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540)[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446)[10:12:19] [Server thread/WARN]: at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)
Any ideas on this as right now I'm clueless?
Reply to this email directly or view it on GitHubhttps://github.com//issues/30
.
Version 0.8.9 should appear in Maven Central shortly
Okay, will try it out as soon as Eclipse or maven sees the newest version
It works! Awesome, thanks for the fix. :)