-
Notifications
You must be signed in to change notification settings - Fork 3
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
Using custom servlet in Quarkus app fails with ClassNotFoundException #19
Comments
The problem is in fundamentally broken code in
It's absolutely wrong to use But this is already properly done in the |
Thank you ;) Yeah I've already took advantage of the Unfortunately this kind of solution is not applicable to Vaadin 14 (since there is nothing similar to |
But you may create a ticket about this: let's redirect this question to the decision makers. |
Description of the bug / feature
Using custom servlet in a Quarkus+Vaadin app causes
DevModeInitializer
to fail with ClassNotFoundException.The reason is that Quarkus uses multiple classloaders; it loads Vaadin jars in one classloader and the app code (including the Servlet class) in another classloader. The "Vaadin classloader" is then unable to load the Servlet class.
The exception stacktrace follows:
Minimal reproducible example
Please see the attached app.
vaadin-quarkus.zip
mvn -C clean package quarkus:dev
Expected behavior
Vaadin should use Thread's context class loader to load the classes
Actual behavior
Vaadin uses
Class.forName()
which usesDevModeInitializer.class.getClassLoader()
.Versions:
The text was updated successfully, but these errors were encountered: