Posted April 16, 20232 yr Hello, when I integrate the mariadb-client via gradle, I get an error message with the message Duplicate key. You can see the complete message as an attachment. Can someone help me to fix that? build.gradle: dependencies { minecraft 'net.minecraftforge:forge:1.19.4-45.0.43' annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' jarJar(group: 'org.xerial', name: 'sqlite-jdbc', version: '[3.0,4.0)') { jarJar.pin(it, '3.41.2.1') } minecraftLibrary('org.xerial:sqlite-jdbc:3.41.2.1') jarJar(group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '[3.0,4.0)') { jarJar.pin(it, '3.1.3') } minecraftLibrary('org.mariadb.jdbc:mariadb-java-client:3.1.3') } Error: Exception in thread "main" java.lang.IllegalStateException: Duplicate key C:\Users\***\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna-platform\5.12.1\97406a297c852f4a41e688a176ec675f72e8329\jna-platform-5.12.1.jar (attempted merging values EmbeddedFileSystemMetadata[path=C:\Users\***\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna-platform\5.12.1\97406a297c852f4a41e688a176ec675f72e8329\jna-platform-5.12.1.jar, fs=C:\Users\***\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna-platform\5.12.1\97406a297c852f4a41e688a176ec675f72e8329\jna-platform-5.12.1.jar] and EmbeddedFileSystemMetadata[path=C:\Users\AdrianMeyer\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna-platform\5.12.1\97406a297c852f4a41e688a176ec675f72e8329\jna-platform-5.12.1.jar, fs=C:\Users\***\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna-platform\5.12.1\97406a297c852f4a41e688a176ec675f72e8329\jna-platform-5.12.1.jar]) at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) 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.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at cpw.mods.securejarhandler/cpw.mods.niofs.union.UnionFileSystem.<init>(UnionFileSystem.java:107) at cpw.mods.securejarhandler/cpw.mods.niofs.union.UnionFileSystemProvider.newFileSystemInternal(UnionFileSystemProvider.java:115) at cpw.mods.securejarhandler/cpw.mods.niofs.union.UnionFileSystemProvider.newFileSystem(UnionFileSystemProvider.java:105) at cpw.mods.securejarhandler/cpw.mods.jarhandling.impl.Jar.<init>(Jar.java:84) at cpw.mods.securejarhandler/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:70) at cpw.mods.securejarhandler/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:62) at cpw.mods.securejarhandler/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:54) at cpw.mods.bootstraplauncher@1.1.2/cpw.mods.bootstraplauncher.BootstrapLauncher.lambda$main$6(BootstrapLauncher.java:99) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at cpw.mods.bootstraplauncher@1.1.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:93) Process finished with exit code 1 Edited April 27, 20232 yr by DestroyedAdventure
April 16, 20232 yr I am not very familiar with jarjar. I have never used it. But I guess you are pulling in a copy of jna as one of the dependencies of that jar. Minecraft already includes jna as part of its classpath and so that is confusing it? Try excluding it: https://forge.gemwire.uk/wiki/Jar-in-Jar#Using_dependency_filters Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
April 27, 20232 yr Author Thanks for the info. Excluding dependencies under minecraftLibrary helped. minecraftLibrary('org.mariadb.jdbc:mariadb-java-client:3.1.3'){ exclude group: 'net.java.dev.jna', module: 'jna-platform' exclude group: 'net.java.dev.jna', module: 'jna' }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.