CSneko / toNeko

喵喵喵~
https://modrinth.com/mod/tonekomod
GNU General Public License v3.0
35 stars 7 forks source link

[Bug] Incompatible class version #30

Open Onako2 opened 3 months ago

Onako2 commented 3 months ago

Plugin isn't compatbible with 1.16.5 because 1.16.5 uses Java 8 but plugin is made for Java 17

[16:59:49] [Server thread/ERROR]: Could not load 'plugins/ctLib-0.1.3.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: org/cneko/ctlib/bootstrap/BukkitBootstrap has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.reload(CraftServer.java:968) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.Bukkit.reload(Bukkit.java:726) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:826) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2315) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:2130) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2083) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:49) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:7) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:55) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1339) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1332) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1308) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1152) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_402]
Caused by: java.lang.UnsupportedClassVersionError: org/cneko/ctlib/bootstrap/BukkitBootstrap has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_402]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_402]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_402]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:201) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_402]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_402]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_402]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_402]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Purpur-1171]
        ... 25 more
[16:59:50] [Server thread/ERROR]: Could not load 'plugins/toNeko-0.2.9.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/crystalneko/toneko/ToNeko has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.reload(CraftServer.java:968) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.Bukkit.reload(Bukkit.java:726) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:826) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2315) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:2130) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2083) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:49) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:7) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:55) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1339) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1332) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1308) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1152) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_402]
Caused by: java.lang.UnsupportedClassVersionError: com/crystalneko/toneko/ToNeko has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_402]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_402]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_402]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:201) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_402]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_402]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_402]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_402]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Purpur-1171]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Purpur-1171]
        ... 25 more
CSneko commented 3 months ago

Yes,the plugin is made for java17. It's supported 1.16 because 1.16 can run with java17. Try to use java17 run 1.16!😀😀

Onako2 commented 3 months ago

Yes,the plugin is made for java17. It's supported 1.16 because 1.16 can run with java17. Try to use java17 run 1.16!😀😀

I tried it already but it wouldn't start the server

CSneko commented 3 months ago

I tested it on Paper,Purpur and Spigot,I found that these server software can run with java17. Please tell me about your environment, I will try to give some help :⁠-⁠)

Because the plugin used some libraries of java11,so I can compatbible it at leastb on java11,I will publish the version compatbible with java11. (^⁠_⁠^)

(Please forgive me for not being very good at using English.:⁠-⁠D)

Onako2 commented 3 months ago

I tested it on Paper,Purpur and Spigot,I found that these server software can run with java17. Please tell me about your environment, I will try to give some help :⁠-⁠)

Because the plugin used some libraries of java11,so I can compatbible it at leastb on java11,I will publish the version compatbible with java11. (^⁠_⁠^)

(Please forgive me for not being very good at using English.:⁠-⁠D)

Oh I was using Java 8 because it was already installed. I'll install then 11

CSneko commented 3 months ago

I tried building with java11 but I found that I did, some of the dependent projects require at least java17. (。・_・。)

Can you tell me what Server you use? I will try to provide greatest help,thanks. (「・ω・)「

Onako2 commented 3 months ago

I use Purpurmc (Fork of paper) for 1.16.5

CSneko commented 2 months ago

I know,I will give you the best reply in 3 days. Believe me.^⁠_⁠^

Onako2 commented 2 months ago

I know,I will give you the best reply in 3 days. Believe me.^⁠_⁠^

No problem ^⁠_⁠^