21w39a server crashes
iGreenDogs opened this issue ยท 4 comments
Discussed in #1757
Originally posted by iGreenDogs October 2, 2021
I wanted to start a fabric server with a proximity chat mod, but when initially starting it up, I get the following (this is directly from the command prompt)
C:\Users\my_name\Desktop\munhunt> java -jar fabric-server-launch.jar
Exception in thread "main" java.lang.RuntimeException: Failed to setup Fabric server environment!
at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:58)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: An exception occurred when launching the server!
at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:116)
at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:56)
Caused by: java.lang.RuntimeException: An exception occurred when launching the server!
at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:70)
at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:114)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:68)
... 2 more
Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at net.fabricmc.loader.launch.common.FabricLauncherBase.<clinit>(FabricLauncherBase.java:48)
at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:27)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at net.fabricmc.loader.launch.server.InjectingURLClassLoader.loadClass(InjectingURLClassLoader.java:57)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
... 9 more
I have tried starting it on my ubuntu server too with the exact same command, and got the same error. I also tried using an older version of the fabric installer. How am I supposed to fix it?
This issue is fixed but not released yet, see:
FabricMC/fabric-loader#528
You might be able to workaround it by adding log4j to your classpath manually? e.g.
java -classpath log4j.jar -jar fabric-server-launch.jar
I haven't tried this myself to see if it works.
You need Fabric Loader 0.12 - see https://fabricmc.net/2021/10/03/loader-0120.html