Lithium (Fabric)

Lithium (Fabric)

22M Downloads

Conflict With ModUpdater

TheBrokenRail opened this issue ยท 1 comments

commented

Expected Behavior

It starts successfully with ModUpdater.

Actual Behavior

[22:02:49] [main/ERROR]: Error loading companion plugin class [me.jellysquid.mods.lithium.mixin.LithiumMixinPlugin] for mixin config [lithium.mixins.json]. The plugin may be out of date: FactoryConfigurationError:Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
	at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:145) ~[380f7456-4d9b-4995-8be7-b763afa3afa3.jar:?]
	at org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:191) ~[server.jar:?]
	at org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:92) ~[server.jar:?]
	at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46) ~[server.jar:?]
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:522) ~[server.jar:?]
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:459) ~[server.jar:?]
	at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:265) ~[server.jar:?]
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613) ~[server.jar:?]
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634) ~[server.jar:?]
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229) ~[server.jar:?]
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242) ~[server.jar:?]
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) ~[server.jar:?]
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174) ~[server.jar:?]
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618) ~[server.jar:?]
	at me.jellysquid.mods.lithium.mixin.LithiumMixinPlugin.<init>(LithiumMixinPlugin.java:20) ~[lithium-fabric-mc1.16.1-0.5.0-rc1(1).jar:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at java.lang.Class.newInstance(Class.java:584) ~[?:?]
	at org.spongepowered.asm.mixin.transformer.PluginHandle.<init>(PluginHandle.java:97) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinConfig.onSelect(MixinConfig.java:598) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.selectConfigs(MixinProcessor.java:476) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:438) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:416) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:285) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:191) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178) [fabric-server-launch.jar:?]
	at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23) [fabric-server-launch.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:157) [fabric-server-launch.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:143) [fabric-server-launch.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:522) [?:?]
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:190) [fabric-server-launch.jar:?]
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140) [fabric-server-launch.jar:?]
	at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:26) [fabric-server-launch.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at net.fabricmc.loader.launch.server.FabricServerLauncher.launch(FabricServerLauncher.java:61) [fabric-server-launch.jar:?]
	at net.fabricmc.loader.launch.server.FabricServerLauncher.setup(FabricServerLauncher.java:105) [fabric-server-launch.jar:?]
	at net.fabricmc.loader.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:49) [fabric-server-launch.jar:?]

Reproduction Steps

Start a server (doesn't happen with the client) running both Lithium and ModUpdater (https://www.curseforge.com/minecraft/mc-mods/modupdater).

Thoughts

It seems ModUpdater's JIJ'd Dom4J library is conflicting with Lithium calling getLogger inside its Mixin plugin, which makes no sense considering ModUpdater itslef (and Minecraft) all call getLogger() at various points in time. Dom4j is bundled in ModUpdater here: https://gitea.thebrokenrail.com/TheBrokenRail/ModUpdater/src/branch/master/build.gradle#L33. I have no idea why this would cause a conflict,

commented

It seems this was caused by Dom4j, so I switched to an alternative and it solved the issue!