When attempting to run the Minecraft server jar with a Java executable compiled with the OpenJ9 VM, it fails to load and instead prints a stack trace:
Exception in thread "main" java.lang.BootstrapMethodError: java.lang.ExceptionInInitializerError
{{ at hk.<clinit>(SourceFile:50)}}
{{ at gm.<clinit>(SourceFile:237)}}
{{ at vm.a(SourceFile:42)}}
{{ at net.minecraft.server.Main.main(SourceFile:88)}}Caused by: java.lang.ExceptionInInitializerError
{{ at java.lang.J9VMInternals.ensureError(J9VMInternals.java:148)}}
{{ at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:137)}}
{{ at java.lang.invoke.MethodHandle.getCPMethodHandleAt(Native Method)}}
{{ at java.lang.invoke.MethodHandle.getAdditionalBsmArg(MethodHandle.java:869)}}
{{ at java.lang.invoke.MethodHandle.resolveInvokeDynamic(MethodHandle.java:948)}}
{{ ... 4 more}}Caused by: java.lang.NullPointerException
{{ at hk.a(SourceFile:88)}}
{{ at kk.a(SourceFile:20)}}
{{ at kk.<clinit>(SourceFile:13)}}
{{ ... 7 more}}
Steps to replicate:
1: Download an OpenJ9 build from https://adoptopenjdk.net
2: Run the server jar in the command line with any arguments
Expected behavior:
The Minecraft server properly loads.
This occurred on 1.16.2 Pre-release 2 as well, and did not seem to occur on pre-release 1. I am able to replicate this on both Windows and Linux operating systems.
Linked issues
is duplicated by 4
Comments 16
Well, it worked perfectly in 1.15.2, 1.16, 1.16.1 and 1.16.2 pre-release 1. Every version after that stopped working (pr 2, 3 and rc1)
If it worked and now it doesn't without upgrading Java, only changing the Minecraft version, I'm gonna say is Minecraft problem.
Please also report this to OpenJ9's github page as a potential bug on their end, as everything works just fine with the JVM that comes with the game and is still likely an issue on OpenJ9's end.
I think is already reported, but in my opinion Mojang could check what happened in 1.16.2 pr2, because something has changed in that version.
For more details, see: https://github.com/eclipse/openj9/issues/10356#issuecomment-673222053
This issue also affects the proprietary IBM J9 virtual machine (version 8) and is present for both the client and the dedicated server software on the released 1.16.2 version.
A fix has been merged into openj9 - https://github.com/eclipse/openj9/pull/10410
A fix has been made to Paper: https://github.com/PaperMC/Paper/pull/4179
Made in spigot mappings
Another moderator's comment on MC-148371: