Crash at boot on dedicated server
LemADEC opened this issue ยท 5 comments
As of 1.12.2-2.5.3, a crash prevent to boot a dedicated server:
[15:15:01] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: gigaherz/guidebook/client/BookRegistryEvent
> at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_171]
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[?:1.8.0_171]
> at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[?:1.8.0_171]
> at net.minecraftforge.fml.common.FMLModContainer.gatherAnnotations(FMLModContainer.java:388) ~[forge-1.12.2-14.23.4.2707-universal.jar:?]
> at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:584) ~[forge-1.12.2-14.23.4.2707-universal.jar:?]
> at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) ~[?:?]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
> at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[minecraft_server.1.12.2.jar:?]
> at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) ~[forge-1.12.2-14.23.4.2707-universal.jar:?]
> at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) ~[forge-1.12.2-14.23.4.2707-universal.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
> at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[minecraft_server.1.12.2.jar:?]
> at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[minecraft_server.1.12.2.jar:?]
> at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) ~[LoadController.class:?]
> at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:593) ~[Loader.class:?]
> at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?]
> at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:332) ~[FMLCommonHandler.class:?]
> at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125) ~[nz.class:?]
> at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.ClassNotFoundException: gigaherz.guidebook.client.BookRegistryEvent
> at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_171]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_171]
> ... 35 more
Caused by: java.lang.NullPointerException
I've seen a .client. package in the path, so it felt like a classic case of wrongly sided code.
"Linking Through the Ages (LTTA)" is already updated to fix the issue on their side.
Guidebook 2.5.3 made it so it shouldn't crash in a dedicated server, even if a mod decides to register the event in it, so all that remains would be loading order. :P
Edit: It will remain in a client package, but it won't be SideOnly or any crazy thing like that.
The error (java.lang.NoClassDefFoundError: gigaherz/guidebook/client/BookRegistryEvent) is caused because the mod that adds the guidebook has not directed Forge to load the mod AFTER guidebook. Contact the author of that mod and ask them to add "after:gbook" as a dependency in their main class. To identify that mod, you will need to look in the full crash txt file.
As an addendum: this could be caused for other reasons, but the specific case where it ends with Caused by: java.lang.NullPointerException
, is as @TheFloydman says, an issue of loading order.
I'll look into making that problem more clear, if I can't prevent it, in future versions.