architectury-loom
architectury-loom copied to clipboard
Failed to start Forge after 1.20.3 in IDEA
Repo: SinoCraftProject/SinoSeries
Reproduce:
- Clone repo with commit
bbf99ac
. - Run
Minecraft Forge Server (:sinoseries-meta:sinoseries-meta-forge)
.
Log:
[Architectury Transformer] Architectury Runtime 5.2.80
[Architectury Transformer] Read classpath in 3.653 s
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at net.minecraftforge.bootstrap.Bootstrap.start(Bootstrap.java:48)
at net.minecraftforge.bootstrap.ForgeBootstrap.main(ForgeBootstrap.java:18)
at juuxel.unionrelauncher.UnionRelauncher.main(UnionRelauncher.java:92)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:219)
Caused by: java.lang.module.FindException: Module org.lwjgl.tinyfd not found, required by org.lwjgl.tinyfd.natives
at java.base/java.lang.module.Resolver.findFail(Resolver.java:893)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:192)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:141)
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:492)
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:298)
at [email protected]/net.minecraftforge.bootstrap.Bootstrap.moduleMain(Bootstrap.java:77)
... 9 more
After my test, it seemed to be a problem that occurred on forge 1.20.3+.
A similar issue in another project with forge 1.20.3-49.0.2.
Both client and server.
qyl27/NBTEdit
Same issue. 1.20.4 forge.
I had a similar issue with Forge 1.20.4 but for server only. Somehow arch-loom is adding LWGJL natives but not LWGJL itself. I managed to fix the issue by adding the following code to my buildscript.
afterEvaluate {
tasks.runServer {
classpath = classpath.filter { !it.toString().contains("\\org.lwjgl\\") }
}
}
I'm completely removing LWJGL because it is not needed on the server anyway. This is not a clean fix but it works for me.
This now also affects the Forge runClient
task. Using Minecraft Forge 50.0.0 for Minecraft 1.20.6 on ArchLoom 1.6-SNAPSHOT. The workaround posted above does not work for me. Fabric and NeoForge don't have any issue.
Here is the exception:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at net.minecraftforge.bootstrap.Bootstrap.bootstrapMain(Bootstrap.java:133)
at net.minecraftforge.bootstrap.Bootstrap.start(Bootstrap.java:53)
at net.minecraftforge.bootstrap.ForgeBootstrap.main(ForgeBootstrap.java:19)
at juuxel.unionrelauncher.UnionRelauncher.main(UnionRelauncher.java:92)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:219)
Caused by: java.lang.module.FindException: Module jopt.simple not found, required by cpw.mods.modlauncher
at java.base/java.lang.module.Resolver.findFail(Resolver.java:892)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:192)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:141)
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:491)
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:297)
at [email protected]/net.minecraftforge.bootstrap.Bootstrap.moduleMain(Bootstrap.java:166)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 7 more
Also runServer
is still broken:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at net.minecraftforge.bootstrap.Bootstrap.bootstrapMain(Bootstrap.java:133)
at net.minecraftforge.bootstrap.Bootstrap.start(Bootstrap.java:53)
at net.minecraftforge.bootstrap.ForgeBootstrap.main(ForgeBootstrap.java:19)
at juuxel.unionrelauncher.UnionRelauncher.main(UnionRelauncher.java:92)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:219)
Caused by: java.lang.module.FindException: Module org.lwjgl.openal not found, required by org.lwjgl.openal.natives
at java.base/java.lang.module.Resolver.findFail(Resolver.java:892)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:192)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:141)
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:491)
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:297)
at [email protected]/net.minecraftforge.bootstrap.Bootstrap.moduleMain(Bootstrap.java:166)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 7 more