Every time that i try to load any mixin on server prod environment with MixinBootstrap this happens
augustresende opened this issue · 4 comments
Environment
- MixinBootstrap version: 0.3
- Forge version: 32.0.63 (build is 32.0.59)
- Minecraft version: 1.16.1
- Java version: 8
- Mods:
Vanilla Experience (https://github.com/AugustoResende/VanillaExperience)
i'm the mod developer
Issue Description
Every time that i try to load any mixin on server prod environment with MixinBootstrap this happens
Not happens if forge dev server, not happens on forge dev client and not happens on forge prod client with mixinbootstrap
←[mException in thread "main" ←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.server.ServerMain.main(ServerMain.java:57)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: Caused by: java.lang.reflect.InvocationTargetException
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.reflect.Method.invoke(Unknown Source)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: ... 7 more
←[m←[32m[15:02:17] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.lang.IllegalAccessError: tried to access class com.google.common.collect.CollectPreconditions from class com.google.common.collect.Lists```
debug.log = https://pastebin.com/LQ22Tv55
Welcome to classloader hell.
Your IMixinConnector
(MixinLoader
) is loading the VexUtils
class which is then loading net.minecraft.util.SharedConstants
which then goes on to load a bunch of other classes.
Avoid loading Minecraft classes from your IMixinConnector
and from any classes your IMixinConnector
calls otherwise you will end up with these really weird and random issues.
Also I see your refmap is named mixin.refmap.json
I highly recommend you rename this to be unique such as mixins.vanillaexperience.refmap.json
as the files can be overwritten by other mods who also use the same refmap name.
@LXGaming thanks, how can i change the refmap name? Is build.gradle thing? please help me.
You can find an example here: https://github.com/qouteall/ForgeWithMixinExample
You can rename the refmap by adding the following to your forge build.gradle:
mixin {
add sourceSets.main, "you_should_rename_this.refmap.json"
}
Then in your forge mixin configs change the refmap entry.