Java 14?
bobhenl opened this issue · 4 comments
Hi, is MultiverseCore working with Java 1.14? I'm using TerraformGenerator and there's some error with multiverse too mentioned in it. I asked author and he said that it's inbuilt Java 14 error. Couldn't be solve also by multiverse somehow?
[02:51:16] [Server thread/INFO]: [TerraformGenerator] Detected world: MiningWorld, commencing injection...
[02:51:16] [Server thread/WARN]: java.lang.reflect.InvocationTargetException
[02:51:16] [Server thread/WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[02:51:16] [Server thread/WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[02:51:16] [Server thread/WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[02:51:16] [Server thread/WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[02:51:16] [Server thread/WARN]: at org.terraform.reflection.Post14PrivateFieldHandler.injectField(Post14PrivateFieldHandler.java:34)
[02:51:16] [Server thread/WARN]: at org.terraform.coregen.v1_16_R1.NMSInjector.attemptInject(NMSInjector.java:58)
[02:51:16] [Server thread/WARN]: at org.terraform.main.TerraformGeneratorPlugin.onWorldInit(TerraformGeneratorPlugin.java:104)
[02:51:16] [Server thread/WARN]: at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor39.execute(Unknown Source)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[02:51:16] [Server thread/WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)
[02:51:16] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.createWorld(CraftServer.java:1159)
[02:51:16] [Server thread/WARN]: at org.bukkit.Bukkit.createWorld(Bukkit.java:570)
[02:51:16] [Server thread/WARN]: at org.bukkit.WorldCreator.createWorld(WorldCreator.java:325)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:467)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:448)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:423)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.loadWorlds(WorldManager.java:728)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.MultiverseCore.onEnable(MultiverseCore.java:310)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[02:51:16] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:500)
[02:51:16] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:414)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:471)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[02:51:16] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:832)
[02:51:16] [Server thread/WARN]: Caused by: java.lang.UnsatisfiedLinkError: 'void java.lang.invoke.VarHandle.set(java.lang.Object[])'
[02:51:16] [Server thread/WARN]: at java.base/java.lang.invoke.VarHandle.set(Native Method)
[02:51:16] [Server thread/WARN]: ... 30 more
[02:51:16] [Server thread/INFO]: [TerraformGenerator] Java 14 detected. TerraformGenerator may or may not work, but if it does, good on you!
[02:51:16] [Server thread/WARN]: java.lang.reflect.InvocationTargetException
[02:51:16] [Server thread/WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[02:51:16] [Server thread/WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[02:51:16] [Server thread/WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[02:51:16] [Server thread/WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[02:51:16] [Server thread/WARN]: at org.terraform.reflection.Post14PrivateFieldHandler.injectField(Post14PrivateFieldHandler.java:34)
[02:51:16] [Server thread/WARN]: at org.terraform.coregen.v1_16_R1.NMSInjector.attemptInject(NMSInjector.java:60)
[02:51:16] [Server thread/WARN]: at org.terraform.main.TerraformGeneratorPlugin.onWorldInit(TerraformGeneratorPlugin.java:104)
[02:51:16] [Server thread/WARN]: at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor39.execute(Unknown Source)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[02:51:16] [Server thread/WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)
[02:51:16] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.createWorld(CraftServer.java:1159)
[02:51:16] [Server thread/WARN]: at org.bukkit.Bukkit.createWorld(Bukkit.java:570)
[02:51:16] [Server thread/WARN]: at org.bukkit.WorldCreator.createWorld(WorldCreator.java:325)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:467)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:448)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:423)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.loadWorlds(WorldManager.java:728)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.MultiverseCore.onEnable(MultiverseCore.java:310)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380)
[02:51:16] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[02:51:16] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugin(CraftServer.java:500)
[02:51:16] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R1.CraftServer.enablePlugins(CraftServer.java:414)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:471)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941)
[02:51:16] [Server thread/WARN]: at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[02:51:16] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:832)
[02:51:16] [Server thread/WARN]: Caused by: java.lang.UnsatisfiedLinkError: 'void java.lang.invoke.VarHandle.set(java.lang.Object[])'
[02:51:16] [Server thread/WARN]: at java.base/java.lang.invoke.VarHandle.set(Native Method)
[02:51:16] [Server thread/WARN]: ... 30 more
Stack traces are generally read backwards, e.g.
[02:51:16] [Server thread/WARN]: at org.bukkit.Bukkit.createWorld(Bukkit.java:570)
[02:51:16] [Server thread/WARN]: at org.bukkit.WorldCreator.createWorld(WorldCreator.java:325)
[02:51:16] [Server thread/WARN]: at com.onarandombox.MultiverseCore.utils.WorldManager.doLoad(WorldManager.java:467)
In your log, means that the multiverse World Manager is doing something called 'doLoad', which is creating a world using the bukkit World Creator, which then creates a world.
Much much deeper, TerraformGeneratorPlugin is attempting to do some hacky reflection (probably to access minecraft internal world generation stuff, and customize it) and it's choking on (what I assume to be) Java 14 security changes, possibly bugs, or changes between 1.16.1 and a previous minecraft version.
Either way, it has NOTHING to do with multiverse, other then multiverse telling another plugin to create a new world.
This suggest to me they are aware of issues potentially with Java 14, and have (possibly experimental) support for working around them with a different reflection technique.
and attempt to use Method and Var handles instead.
This line here:
, then reporting the bug to them here if it persists: https://github.com/Hex27/TerraformGenerator/issuesat org.terraform.coregen.v1_16_R1.NMSInjector.attemptInject(NMSInjector.java:58)
Shows me that you arn't even running the latest version of the world gen you are attempting to use. So I'd suggest updating if necessary
But note, at the end of the day, you are still trying to use Java 14, when it's not yet commonly accepted in the minecraft community. Just use the current (Long Term Support, LTS) release of Java to run your server instead (That's Java 11 currently), it'll be a lot less painful, and let developers / people capable of debugging to do the testing for the latest release..
Also the world generator you are using has links against Minecraft 1.14 code, whilst the server you are running is on 1.16, If the plugins you are using hook into NMS using reflection, They really need to be updated for 1.16, or you need to downgrade and use hacks like ViaVersion to let 1.16 clients connect.
Edit: disregard the 1.14 comments, I was in the wrong package / commit earlier, it's updated for 1.16
Also: quoted from https://www.spigotmc.org/resources/terraformgenerator-alpha.75132/
There is also support for Java 14, but be warned that it will spit some minor errors, because the plugin does some Java illegal magic to get things done.
And see the authors reply here: https://www.spigotmc.org/threads/terraformgenerator-alpha.417320/page-5#post-3908849
Thanks @ryantheleach for looking into this! As it seems this isn't MV Related, this issue can be closed.