[Guilds][java 16] Could not download Artifact{groupId='org.jetbrains.kotlin', artifactId='kotlin-stdlib', version='1.4.32', repoBaseURL='maven'}
See original GitHub issueDescription
when guilds plugin start up on java 16, it show the following errors
[10:45:46 ERROR]: [Guilds] Could not download Artifact{groupId='org.jetbrains.kotlin', artifactId='kotlin-stdlib', version='1.4.32', repoBaseURL='maven'}
java.util.concurrent.CompletionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1769) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?]
Caused by: java.lang.ExceptionInInitializerError
at me.bristermitten.pdm.DependencyLoader.loadDependency(DependencyLoader.java:47) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?]
... 8 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @5bcf99e0
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) ~[?:?]
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
at java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[?:?]
at java.lang.reflect.Method.setAccessible(Method.java:193) ~[?:?]
at me.bristermitten.pdm.util.ClassLoaderReflection.<clinit>(ClassLoaderReflection.java:33) ~[?:?]
at me.bristermitten.pdm.DependencyLoader.loadDependency(DependencyLoader.java:47) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?]
... 8 more
[10:45:46 ERROR]: [Guilds] Could not download Artifact{groupId='org.jetbrains.kotlin', artifactId='kotlin-stdlib-jdk8', version='1.4.32', repoBaseURL='maven'}
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: Could not initialize class me.bristermitten.pdm.util.ClassLoaderReflection
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1769) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.helpAsyncBlocker(ForkJoinPool.java:1145) ~[?:?]
at java.util.concurrent.ForkJoinPool.helpAsyncBlocker(ForkJoinPool.java:3160) ~[?:?]
at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1883) ~[?:?]
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2113) ~[?:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at me.bristermitten.pdm.DependencyManager.lambda$download$3(DependencyManager.java:147) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: Could not initialize class me.bristermitten.pdm.util.ClassLoaderReflection
at me.bristermitten.pdm.DependencyLoader.loadDependency(DependencyLoader.java:47) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?]
... 17 more
[10:45:46 ERROR]: [org.bukkit.craftbukkit.v1_16_R3.CraftServer] java.lang.NoClassDefFoundError: Could not initialize class me.bristermitten.pdm.util.ClassLoaderReflection initializing Guilds v3.5.5.8 (Is it up to date?)
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: Could not initialize class me.bristermitten.pdm.util.ClassLoaderReflection
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1769) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: Could not initialize class me.bristermitten.pdm.util.ClassLoaderReflection
at me.bristermitten.pdm.DependencyLoader.loadDependency(DependencyLoader.java:47) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?]
... 8 more
Expected Behavior
there should be no error and in java 11, no error
Actual Behavior
the error appear every time when the server start up and i have tested with only 1 guilds installed
Possible Fix
idk 😦 not sure is this a problem with java 16 support or not or just a non related bug
Steps to Reproduce
1.start up server 2.wait 3. 4.
Context
it only show the error, the system should not be affected, most of the core functions are working
Your Environment
- Guilds version
- 3.5.5.8
- MC Version
- 1.16.5 purpur 1111
- Plugin List
- guilds
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
IntelliJ Community build error downloading Kotlin plugin
A problem occurred evaluating script. > Could not resolve all files for configuration ':kotlinPlugin'. > Could not resolve ideadev.com.jetbrains ...
Read more >Idea tries to download kotlin:kotlin-dist-for-jps-meta from ...
Version (1.7.0-release-282) of the Kotlin JPS plugin will be used The reason: Failed to download Maven artifact ...
Read more >Could not initialize class org.jetbrains.kotlin.com.intellij.pom ...
@Alexander Udalov I have a Kotlin project that works ok with JDK 16 when building via Maven on the command with --illegal-access=permit in...
Read more >Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.31
Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.31. > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.31. > Could not get resource ...
Read more >Kotlin 1.6.0 Released - The JetBrains Blog
Kotlin 1.6.0 is now officially released with Stable exhaustive ... In this blog post, you can find an overview of the following updates:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey guys! I am totally aware of this issue and it lies from one of the dependencies that Guilds uses for library downloads. That being said, I have reached out to the developer of that library and am hoping to come to a solution soon.
The reason that we runtime download libraries is that shading in Kotlin puts the Guild jar over the SpigotMC limit which prevents me from pushing out updates.
With that being said, I’ve created a jar for you guys to use until this issue is resolved. https://glare.dev/static/Guilds-3.5.5.9-DEV-FULL.jar
CC: @HauserGrim @hkkongou
Fixed via https://github.com/guilds-plugin/Guilds/commit/d3dc4c6e1df9cfc0b4db399be1e5d5c3474add13