-
Notifications
You must be signed in to change notification settings - Fork 22
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
NoClassDefFoundError: org/beryx/jlink/shadow/asm/ClassVisitor since v1.13.0 #136
Comments
Thanks for you reply. Unfortunately, that means you have to provide the required modules instead of having the plug-in generate them for you (using @hakanai, do you happen to have any idea? |
The Java module system is something I haven't tried using since way back when jdk9 first came out, and at work we pretty much decided it would be unusable in the near future and still haven't switched to it. From the error, my first guess is perhaps we have to provide that add-modules flag when |
I just ran into the same issue after upgrading to 1.13.0 as well. |
I've found the most likely commit: 3b04fc7 This added jar shadowing: shadowJar {
configurations = [project.configurations.plugin]
archiveClassifier = null
dependencies {
include(dependency("org.ow2.asm:asm:$asmVersion"))
include(dependency("org.ow2.asm:asm-commons:$asmVersion"))
include(dependency("org.ow2.asm:asm-tree:$asmVersion"))
include(dependency("org.ow2.asm:asm-util:$asmVersion"))
include(dependency("org.ow2.asm:asm-anaysis:$asmVersion"))
}
relocate 'org.objectweb.asm', 'org.beryx.jlink.shadow.asm'
} Sounds a bit like the shadowing went wrong, renamed a class but not its reference? @siordache |
I can reproduce here too. I can also confirm that the offending class is absent from the jar when I build locally, in fact, none of the extra dependencies the build is listing seem to end up in it for me. |
+1 |
Having the same issue (Gradle 8.0.2, Java 19). Any chance to get a fix? Thanks. |
Hello, I have the same issue with Gradle 8.1.1. and Java 19.
This lead to this error:
A solution to this bug would be very appreciated. |
Same here after upgrading to 1.13.0. |
Same issue after upgrading to 1.13 |
* downgraded badass-runtime from 1.13.0 to 1.12.7 * see beryx/badass-runtime-plugin#136 * use launcher class in application
* downgraded badass-runtime from 1.13.0 to 1.12.7 * see beryx/badass-runtime-plugin#136 * use launcher class in application
same here after upgrading to 1.13.0 |
I don't think this has anything to do with Java modules. It looks like the build is trying to shade the asm dependency into the jar, but it's slightly misconfigured. Here's a decent starting point for a fix: #147 I'm not sure what the original intention for the |
After upgrading the plugin from v1.12.7 to v1.13.0, I get an exception when building.
Environment info:
Output with stacktrace:
I tried troubleshooting it, but was unable to come up with a solution. I wonder if it's related to #130? I tried to provide all relevant info, if you need more info, please let me know. If you could take a look at this, that'd be awesome, thanks! 😄
The text was updated successfully, but these errors were encountered: