-
Notifications
You must be signed in to change notification settings - Fork 88
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
FasterXML Jackson typeCache ClassLoader leak #75
Comments
Thanks for the report! Would you care to try out my suggested fix by compiling from sources, before I prepare another release? |
Hi, Surprisingly it said "NoSuchMethod" for "clearCache()" When I investigated that error i saw that _typeCache is instance of LRUMap (as we can see above screenshot) but at 2.9.4 version _typeCache is instance of SimpleLookupCache After more investigation i realized that "clearCache()" is not exists before 2.4 version and LRUMap extends LinkedHashMap and has no clear method at these versions. At 2.8 version, LRUMap is still exists but it wraps ConcurrentHashMap as _map variable and has clear method. At our test environment, using wls-cat I found that LRUMap is loaded by 2.8.4 version so your fix probably works but at my local environment old version is loaded for some reason i do not understand. To solve this problem i modified your fix like that if clearCache() method is exists invoke it but if doesn't exist than find _typeCache object and invoke _typeCache.getClass().getSuperClass().clear() and it has worked. Thanks for your fix. |
Seems that |
I have tested and it is ok now |
This was included in version 2.6.0 just released to Maven Central. |
Hi ,
FasterXML which bundled with WebLogic has a classloader leak that causes to hold application classloader.
com.fasterxml.jackson.databind.type.TypeFactory#_typeCache holds some cache data that can refer application classes and application classloader at the same time.
Here is a screenshot that shows the leak;
Note: AgencyRequestHeader class is loaded by our application class loader.
This problem had been reported on github but i think it is still exists at newest version. At least I know that it exists at weblogic 12.
FasterXML/jackson-databind#1363
Invoking TypeFactory.defaultInstance().clearCache() at cleanup stage in leak-prevention api can solve the problem.
The text was updated successfully, but these errors were encountered: