Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.7.2
-
None
Description
Any Groovy application (including Grails apps) that deploy to Tomcat 6.0.26 and above has this issue because basically Tomcat clears thread locals not manually shutdown by the application to prevent memory leaks.
This can lead to problems starting and stopping Groovy based application with errors like the following occuring:
[java] Exception in thread "Thread-3" java.lang.NullPointerException
[java] at org.codehaus.groovy.runtime.GroovyCategorySupport.hasCategoryInCurrentThread(GroovyCategorySupport.java:216)
[java] at groovy.lang.MetaClassImpl.getMethodWithCaching(MetaClassImpl.java:1128)
[java] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
[java] at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:915)
[java] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
[java] at groovy.lang.Closure.call(Closure.java:276)
[java] at groovy.lang.Closure.call(Closure.java:271)
[java] at groovy.lang.Closure.run(Closure.java:354)
Groovy needs to include the ability to manually shutdown the any categories that exist in any threads and also re-instate the categories if they are nulled (like what happens with Tomcat)
Attachments
Attachments
Issue Links
- is related to
-
GROOVY-4130 Using categories results in multiple thread locals being retained that Tomcat has to forcibly clear
- Closed
- relates to
-
GROOVY-4698 Possible memory leak in Tomcat
- Closed