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.
Environment
Linux:
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
Eclipse OpenJ9 VM (build openj9-0.20.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200416_608 (JIT enabled, AOT enabled)
OpenJ9 - 05fa2d361
OMR - d4365f371
JCL - cfa47e66cd5 based on jdk8u252-b09)
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.20.0, JRE 11 Linux amd64-64-Bit Compressed References 20200416_574 (JIT enabled, AOT enabled)
OpenJ9 - 05fa2d361
OMR - d4365f371
JCL - 838028fc9d based on jdk-11.0.7+10)
Output of `uname -a`:
Linux [computername] 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux
Windows:
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
Eclipse OpenJ9 VM (build openj9-0.20.0, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20200422_667 (JIT enabled, AOT enabled)
OpenJ9 - 05fa2d361
OMR - d4365f371
JCL - 5e623848e9 based on jdk8u252-b09)
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: