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
QueuedThreadPool sets wrong Classloader for use in quarkus #6399
Comments
@JiriOndrusek the reason We cannot know how applications use the threads in You can override I don't think there is much that we can do in general -- if we set the TCCL we break OSGi applications, if we don't we break someone else. See also #6396. |
@sbordet thanks for the explanation and some ways of solving this.. I wasn't sure whether this thing could be changed in jetty. I'll try to override it. |
@JiriOndrusek please report back your solution, it would help others as well. Thanks! |
@JiriOndrusek can this issue be closed now? |
This issue could be closed. . |
Jetty version(s)
jetty-9.4.40.v20210413
Description
QueuedThreadPool
sets classloader for new threads togetClass().getClassLoader()
which sets classloader toQuarkusClassLoaderQuarkus Base Runtime ClassLoader
for quarkus based project. This classloader can not load classes from the current project.Correct classloader should be obtained by
Thread.currentThread().getContextClassLoader()
, which sets classloader toQuarkusClassLoader:Quarkus Runtime ClassLoader
which works even for current projects.This issues blocks apache/camel-quarkus#2651
How to reproduce?
The text was updated successfully, but these errors were encountered: