lacito Posted July 2, 2010 Share Posted July 2, 2010 Dear developers,We have developed a web application which uses JasperReports 3.7.3.We use Tomcat 6.0.26 as a container. (Win XP, JDK 1.6.0_10)We shutted down Tomcat, and we found the following messages in the catalina.log file:SEVERE: A web application created a ThreadLocal with key of type [null] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@19d373]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. It seems to be a leak.Can you confirm it?Thanks,Laszlo Sas Link to comment Share on other sites More sharing options...
lucianc Posted July 2, 2010 Share Posted July 2, 2010 That type of leaks cause problems when the web application is stopped or redepolyed (without restarting Tomcat). If you don't do that, there are no reasons to worry.In any case, log it as a bug and we'll see what we can do about it.Regards,Lucian Link to comment Share on other sites More sharing options...
lacito Posted July 2, 2010 Author Share Posted July 2, 2010 Thank you for the fast answer! :) Regards, Laszlo Link to comment Share on other sites More sharing options...
xmedeko Posted September 2, 2010 Share Posted September 2, 2010 Hi,I have fixed that, seehttp://jasperforge.org/projects/jasperreports/tracker/view.php?id=4768 Unfortunatelly, there are more ThreadLocal memory leaks in JasperReports :-( Link to comment Share on other sites More sharing options...
xmedeko Posted September 2, 2010 Share Posted September 2, 2010 See http://jasperforge.org/projects/jasperreports/tracker/view.php?id=4882 Unfortunatelly, there are even more ThreadLocal memory leaks in JasperReports :-( Link to comment Share on other sites More sharing options...
xmedeko Posted September 2, 2010 Share Posted September 2, 2010 I have set net.sf.jasperreports.evaluator.class.reference.fix.enabled=falsein the jasperreports.properties and now it is not, hopefully, leaking. i think there are more memory leaks in the code (e.g. http://jasperforge.org/projects/jasperreports/tracker/view.php?id=3084), but I just do not use this code. Link to comment Share on other sites More sharing options...
xmedeko Posted October 1, 2010 Share Posted October 1, 2010 Hmm, version 3.7.5 released and the memory leaks are not fixed there :-( Link to comment Share on other sites More sharing options...
xmedeko Posted January 14, 2011 Share Posted January 14, 2011 Hello JasperReports developers,are you going to solve these redeploy memory leaks in JasperReports some day? May some financial contribution to your project encourage you to take interest in these nasty things? /tools/fckeditor/editor/images/smiley/msn/wink_smile.gifI have already submitted two pathes fixing these memory leaks, but none of them has been accepted up to now (version 4.0.0). At least the BorderOffset patch is not breaking any original functionality.I am asking epsecially to know If we can hope once these leaks will be solved or if we should change our deployment & release process to take into account and restart our server before each redeploy.ThanksAndy Link to comment Share on other sites More sharing options...
xmedeko Posted March 30, 2011 Share Posted March 30, 2011 I have found one more leak in SimpleFontExtensionHelper. If you make put SoftReference into the ThreadLocal then it is still memory leaking, since there is a circular reference! Furhemore, I if understand the code in net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries() - it right, then the SimpleFontExtensionHelper is initialized just once per class loader. So it is a nonses to cache its instances in ThreadLocal. Just create it, use it and forget it. No problems, no leaks. Link to comment Share on other sites More sharing options...
xmedeko Posted March 30, 2011 Share Posted March 30, 2011 Submitted bug http://jasperforge.org/projects/jasperreports/tracker/view.php?id=5164 Link to comment Share on other sites More sharing options...
xmedeko Posted April 1, 2011 Share Posted April 1, 2011 I apologize, it seems that SimpleFontExtensionHelper was not a source of the leak in my application. The ThreadLocal->SoftReference just holds the undeployed application in the memory for a few minutes. (Which is not nice, anyway.)No I have a probem with the sun.awt.AppContext.getAppContext() memory leak, since JasperReports uses awt fotnts to measure text width. Grrr, this bloody Java class loader hell. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now