Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load KotlinForForge correctly on Architectury 1.21 #106

Open
Bread-NiceCat opened this issue Aug 27, 2024 · 9 comments
Open

Unable to load KotlinForForge correctly on Architectury 1.21 #106

Bread-NiceCat opened this issue Aug 27, 2024 · 9 comments

Comments

@Bread-NiceCat
Copy link

Minecraft: 1.21
NeoForge: 21.0.143
Architect Plugin: 3.4.159
Architectury Loom: 1.7.412

modImplementation("thedarkcolour:kotlinforforge-neoforge:5.5.0")
Exception in thread "main" java.lang.module.ResolutionException: Module thedarkcolour.kotlinforforge reads more than one module named fml_loader
	at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:900)
	at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:721)
	at java.base/java.lang.module.Resolver.finish(Resolver.java:380)
	at java.base/java.lang.module.Configuration.<init>(Configuration.java:139)
	at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:493)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:75)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ModuleLayerHandler.buildLayer(ModuleLayerHandler.java:87)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:90)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:74)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210)
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
	at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:220)

> Task :neoforge:dev.architectury.transformer.TransformerRuntime.main() FAILED

https://github.com/thedarkcolour/KotlinForForghttps://github.com/thedarkcolour/KotlinForForge/issues/103e/issues/103

 modImplementation("thedarkcolour:kotlinforforge-neoforge:5.5.0") {
        exclude group: "net.neoforged.fancymodloader", module: "loader"
    }
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:103)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:74)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210)
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
	at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:220)
Caused by: 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 MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.dataService(CommonLaunchHandler.java:132)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.NeoForgeDataUserdevLaunchHandler.runService(NeoForgeDataUserdevLaunchHandler.java:28)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
	... 10 more
Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
	at LAYER PLUGIN/[email protected]/thedarkcolour.kotlinforforge.neoforge.KotlinLanguageLoader.loadMod(KotlinLanguageLoader.kt)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:324)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.lambda$buildMods$10(ModLoader.java:311)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
	at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.buildMods(ModLoader.java:317)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
	at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:131)
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.internal.CommonModLoader.begin(CommonModLoader.java:49)
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.data.loading.DatagenModLoader.begin(DatagenModLoader.java:46)
	at TRANSFORMER/[email protected]/net.minecraft.data.Main.main(Main.java:101)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 16 more
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:216)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:216)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:216)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 44 more

> Task :neoforge:dev.architectury.transformer.TransformerRuntime.main() FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':neoforge:dev.architectury.transformer.TransformerRuntime.main()'.
> Build cancelled while executing task ':neoforge:dev.architectury.transformer.TransformerRuntime.main()'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 14s
@milosworks
Copy link

I'm also experiencing this btw!

@chimericdream
Copy link

Did you ever figure out a solution to this? I have started getting this error in my dev environment when trying to update my mods to 1.21.4.

@milosworks
Copy link

milosworks commented Jan 17, 2025

Did you ever figure out a solution to this? I have started getting this error in my dev environment when trying to update my mods to 1.21.4.

try

        implementation("kff") {
                exclude(group = "net.neoforged.fancymodloader", module = "loader")
        }

@chimericdream
Copy link

I get the following error when I add that:

> Supplied String module notation 'kff' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.

@thedarkcolour
Copy link
Owner

You're supposed to replace "kff" with the Kotlin for Forge dependency

@milosworks
Copy link

You're supposed to replace "kff" with the Kotlin for Forge dependency

^

@chimericdream
Copy link

Ah, my bad. If I'm not directly including KFF in my build.gradle but inheriting it via another mod (YACL in my case), do I add the exclude block to the YACL line or explicitly add KFF to the config?

@milosworks
Copy link

Ah, my bad. If I'm not directly including KFF in my build.gradle but inheriting it via another mod (YACL in my case), do I add the exclude block to the YACL line or explicitly add KFF to the config?

Hmm probably add it on the mod that you are depending yes

@chimericdream
Copy link

chimericdream commented Jan 17, 2025

What's weird is that if I add the exclude block to my YACL dependency like so:

modImplementation("dev.isxander:yet-another-config-lib:${rootProject.yacl_version}-neoforge") {
    exclude(group: "net.neoforged.fancymodloader", module: "loader")
}

I get almost the same error as before, except it says fml_loader found multiple copies of fml_loader, instead of KFF finding them:

Exception in thread "main" java.lang.module.ResolutionException: Module fml_loader reads another module named fml_loader

I can't really tell if this is progress or just a shifting goalpost.

Edit:
If it's better for me to create a new ticket and/or move the conversation to Discord, I am happy to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants