Fzzy Config

Fzzy Config

8M Downloads

Tomlkt in Java causes ClassNotFoundException and NoClassDefFoundException

QiuShui1012 opened this issue ยท 3 comments

commented

Error Info:

Caused by: java.lang.NoClassDefFoundError: net/peanuuutz/tomlkt/Toml
	at me.fzzyhmstrs.fzzy_config.impl.ConfigApiImpl.deserializeConfig$fzzy_config(ConfigApiImpl.kt:488)
	at me.fzzyhmstrs.fzzy_config.impl.ConfigApiImpl.deserializeConfig$fzzy_config$default(ConfigApiImpl.kt:486)
	at me.fzzyhmstrs.fzzy_config.impl.ConfigApiImpl.readOrCreateAndValidate$fzzy_config(ConfigApiImpl.kt:141)
	at me.fzzyhmstrs.fzzy_config.impl.ConfigApiImpl.readOrCreateAndValidate$fzzy_config(ConfigApiImpl.kt:224)
	at me.fzzyhmstrs.fzzy_config.impl.ConfigApiImpl.registerAndLoadBoth(ConfigApiImpl.kt:112)
	at me.fzzyhmstrs.fzzy_config.impl.ConfigApiImpl.registerAndLoadConfig$fzzy_config(ConfigApiImpl.kt:106)
	at me.fzzyhmstrs.fzzy_config.api.ConfigApi.registerAndLoadConfig(ConfigApi.kt:124)
	at me.fzzyhmstrs.fzzy_config.api.ConfigApiJava.registerAndLoadConfig(ConfigApiJava.kt:84)
	at me.fzzyhmstrs.fzzy_config.api.ConfigApiJava.registerAndLoadConfig$default(ConfigApiJava.kt:81)
	at me.fzzyhmstrs.fzzy_config.api.ConfigApiJava.registerAndLoadConfig(ConfigApiJava.kt)
	at zh.qiushui.mod.zakuro.config.ZakuroConfig.<clinit>(ZakuroConfig.java:16)
	at zh.qiushui.mod.zakuro.api.module.ModuleInfo.<init>(ModuleInfo.java:33)
	at zh.qiushui.mod.zakuro.api.module.RequireInitModuleInfo.<init>(RequireInitModuleInfo.java:7)
	at zh.qiushui.mod.zakuro.modules.info.AddPaeoniaInfo.<init>(AddPaeoniaInfo.java:7)
	at zh.qiushui.mod.zakuro.modules.Modules.<clinit>(Modules.java:13)
	at zh.qiushui.mod.zakuro.modules.ModuleUtil.shouldApplyMixin(ModuleUtil.java:25)
	at zh.qiushui.mod.zakuro.modules.mixin.MixinModuleConfigPlugin.shouldApplyMixin(MixinModuleConfigPlugin.java:29)
	at org.spongepowered.asm.mixin.transformer.PluginHandle.shouldApplyMixin(PluginHandle.java:132)
	at org.spongepowered.asm.mixin.transformer.MixinInfo.shouldApplyMixin(MixinInfo.java:987)
	at org.spongepowered.asm.mixin.transformer.MixinInfo.readDeclaredTargets(MixinInfo.java:952)
	at org.spongepowered.asm.mixin.transformer.MixinInfo.<init>(MixinInfo.java:881)
	at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:933)
	at org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:858)
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540)
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462)
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438)
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290)
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422)
	... 15 more
Caused by: java.lang.ClassNotFoundException: net.peanuuutz.tomlkt.Toml
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226)
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 45 more

It seems that the toml part also needs to be adapted to Java :(

commented

Addendum: The version of Fabric Language Kotlin is 1.12.1+kotlin.2.0.20, and the version of Tomlkt is 0.3.7

commented

If you are trying to runClient, you may have this issue. You may need to add TomlKt to your local runtime class path.

Repository: mavenCentral()

Dependency: modLocalRuntime "net.peanuuutz.tomlkt:tomlkt-jvm:0.3.7"

commented

Thank. I didn't add -jvm at the end.