webbukkit / dynmap

A set of Minecraft mods that provide a real time web-based map system for various Minecraft server implementations.
https://www.reddit.com/r/Dynmap/
Apache License 2.0
2.07k stars 426 forks source link

1.18 Server won't start with dynmap & Journeymap #3556

Closed BonaireDreams closed 2 years ago

BonaireDreams commented 2 years ago

Issue Description: Modded Forge server fails to start with Dynmap and JourneyMap. Server starts fine with either one removed.

at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:901) at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:815) at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:736) at java.base/java.lang.module.Resolver.finish(Resolver.java:380) at java.base/java.lang.module.Configuration.(Configuration.java:140) at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:494) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:70) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.TransformationServicesHandler.buildTransformingClassLoader(TransformationServicesHandler.java:61) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.Launcher.run(Launcher.java:104) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at cpw.mods.bootstraplauncher@0.1.17/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90)`

BonaireDreams commented 2 years ago

Looks to be an issue with journeymap trying to engage the webengine. Reported on JM github

mikeprimm commented 2 years ago

This is actually a Forge 1.18-ism - it appears they are being clever around module dependencies, and parsing the META-INF files in the mods. Both dynmap and journeymap include jetty in their shaded uberjars, but dynmap rebases the packages - there are literally no org.eclipse.jetty classes there, but Forge (as of 1.18 - this situation with Jetty files is quite old for both mods...) is apparently tripping over the junk META-INF/maven files that were not stripped when the uberjars were built. I'm updating the dynmap build to strip these files, as I'm sure this will be easier to do than to get forge do behave better on this point.

mikeprimm commented 2 years ago

OK - there should be a workaround for this in the latest SNAPSHOT build (#572)

mysticdrew commented 2 years ago

@mikeprimm thanks for looking into this, I will be applying the same fix in Journeymap just in case there are other mods that may conflict.

mikeprimm-triva commented 2 years ago

@mikeprimm thanks for looking into this, I will be applying the same fix in Journeymap just in case there are other mods that may conflict.

Cool - I'd suggest rebasing the jetty packages, too - us not each having our own class namespace is a headache sometimes :). I'm still trying to work our a clean way to embed the JDBC drivers without contaminating the JVM (modern JDBC drivers auto-register via the META-INF/services/java.sql.Driver. while classic ones do it via a static initializer in their Driver class (the Class.forName() stuff), and that registers the URL namespace handling for the whole JVM - so even rebasing MySQL driver will affect the other plugins... I'm looking at doing some classloader tricks to isolate my JDBC drivers from everyone else, but don't have it sorted out just yet...)

mysticdrew commented 2 years ago

@mikeprimm thanks for looking into this, I will be applying the same fix in Journeymap just in case there are other mods that may conflict.

Cool - I'd suggest rebasing the jetty packages, too - us not each having our own class namespace is a headache sometimes :). I'm still trying to work our a clean way to embed the JDBC drivers without contaminating the JVM (modern JDBC drivers auto-register via the META-INF/services/java.sql.Driver. while classic ones do it via a static initializer in their Driver class (the Class.forName() stuff), and that registers the URL namespace handling for the whole JVM - so even rebasing MySQL driver will affect the other plugins... I'm looking at doing some classloader tricks to isolate my JDBC drivers from everyone else, but don't have it sorted out just yet...)

Yea, I included rebasing it with my update. We rebased all of our other shaded deps, not sure why jetty was missed.

mikeprimm-triva commented 2 years ago

Cool - it looked like that was the case, which was why I figured I'd point it out - easy to overlook that stuff :)

BonaireDreams commented 2 years ago

@mikeprimm @mysticdrew FYI, Updated server with latest Dynmap build and JourneyMap Alpha9, Server starts fine and everything is functioning. Reporting this issue closed.