-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
The static field ClassUtil.sCached can cause a class loader leak #1363
Comments
Looks like com.fasterxml.jackson.databind.type.TypeFactory#_typeCache has a similar issue |
Yes, I can see how Potential problem with Thank you for reporting this issue. |
I have hacked up this ugly thing to work around it in the meantime: wildfly/wildfly#9173 Basically I just clear the caches via reflection when something is undeployed. One possibility for working around this could be introducing some kind of SPI to allow the container to clear any static caches. |
@stuartwdouglas yes, that might make sense as a short-term work-around until cleaner solution is found. I could and probably should add a static method in |
I went ahead and ripped out the whole caching: while it could probably be made to work with As to
which will clear cached entries from the shared default instance. |
The static field ClassUtil.sCached was added in 2.7 as a performance optimization, however as it can hold on to classes in a static field this can cause a class loader leak in application servers where databind is provided as part of the app server and not bundled in the deployment.
e.g.: https://issues.jboss.org/browse/WFLY-7037
The text was updated successfully, but these errors were encountered: