-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 in BuildCompatibleExtension #37337
Comments
/cc @evanchooly (kotlin), @geoand (kotlin) |
The code looks correct on the first sight. The stack trace shows that the synthetic bean has been registered, the |
@Ladicek , thanks! I made 2 additional checks:
I also tried setting up |
OK, that's interesting to know. Maybe the |
OK, so the problem is:
This means that the generated This is only an issue in dev mode (or test mode), because in prod, class loading is mostly flat (see https://quarkus.io/guides/class-loading-reference). As a workaround, the target library can be forced into the Runtime CL by setting quarkus.class-loading.reloadable-artifacts=org.axonframework:axon-configuration The most straightforward fix would be to turn all |
Should be fixed by #37397 |
OK that is really weird. That setting definitely made things work when I tried locally. I confess I translated your reproducer from Kotlin/Gradle/YAML to Java/Maven/properties, to rule out a possible bug in some of these layers; let me try again. |
That is funny, the documentation for
And indeed, trying to set it in quarkus:
class-loading:
reloadable-artifacts: org.axonframework:axon-configuration doesn't work. I don't know why, but renaming quarkus.class-loading.reloadable-artifacts=org.axonframework:axon-configuration did help. Go figure 🤷 In any case, the PR should help. |
Describe the bug
Hi!
I'm trying to integrate the AxonFramework with Quarkus using the Jakarata's BuildCompatibleExtension, which is expected to be fully supported by Quarkus
Basically, I have these 2 classes:
When the application starts I get the following exception:
Is this an expected behavior or am I doing something wrong?
Expected behavior
Bean successfully registered
Actual behavior
java.lang.NoClassDefFoundError exception is thrown
How to Reproduce?
./gradlew quarkusDev
Output of
uname -a
orver
No response
Output of
java -version
java version "17.0.6" 2023-01-17 LTS Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190) Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)
Quarkus version or git rev
3.5.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.4
Additional information
No response
The text was updated successfully, but these errors were encountered: