You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Oleg Mikheev (JIRA)" <ji...@apache.org> on 2011/01/16 15:26:45 UTC

[jira] Commented: (WICKET-3312) Tomcat complains about thread local memory leaking when using wickets XForwardedRequestWrapperFactory

    [ https://issues.apache.org/jira/browse/WICKET-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982301#action_12982301 ] 

Oleg Mikheev commented on WICKET-3312:
--------------------------------------

Guys, I'm seeing exactly the same issue on 6.0.26:

SEVERE: A web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@65ddc55f]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@5d79a22d]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

I'm keeping the EntityManager in ThreadLocal, and that message above floods catalina.out each time I shutdown Tomcat.

Does my issue seem to be the same as the one originally reported by Attila?

Do I understand it right that this issue is fixed in Tomcat 7 and not 6?

If yes then should I create a separate issue for 6?

Thanks

> Tomcat complains about thread local memory leaking when using wickets XForwardedRequestWrapperFactory
> -----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3312
>                 URL: https://issues.apache.org/jira/browse/WICKET-3312
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-M3
>            Reporter: Attila Király
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.5-RC1
>
>         Attachments: quickstart.zip, WICKET-3312.patch
>
>
> o.a.w.protocol.http.servlet.XForwardedRequestWrapperFactory can be used to wrap incoming servlet request into o.a.w.protocol.http.servlet.XForwardedRequestWrapper objects. These objects store a SimpleDateFormat array in a private static thread local memory but theye are never cleared. Tomcats memory leak prevention listener detects when the webapp is stopped. Tomcat 7.0.5 logs several times the followings:
> 2011.01.07. 12:50:59 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
> SEVERE: The web application [/wtl] created a ThreadLocal with key of type [null] (value [org.apache.wicket.protocol.http.servlet.XForwardedRequestWrapper$1@6328edf2]) and a value of type [java.text.SimpleDateFormat[]] (value [[Ljava.text.SimpleDateFormat;@141dddba]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.