One point that I forgot to mention was that I am destroying the security
manager when shutting down tomcat.

I noticed the following issue:
https://issues.apache.org/jira/browse/SHIRO-159 (unfortunately it did not
help as I am not using any ShiroFilters and not calling
SecurityUtils.getSubject()).


On Wed, Nov 20, 2013 at 9:17 AM, Stuart Broad <[email protected]> wrote:

> Hi,
>
> I am using core shiro (i.e. not using spring or any web additions).  I
> create my subjects as follows (essentially not using the static VM
> singleton):
>
> new Subject.Builder(mySecurityManager).xxx
>
> However I am getting the following error message when shutting down tomcat:
>
> SEVERE: The web application [/xxx] created a ThreadLocal with key of type
> [org.apache.shiro.util.ThreadContext.InheritableThreadLocalMap] (value
> [org.apache.shiro.util.ThreadContext$InheritableThreadLocalMap@1afb7ac7])
> and a value of type [java.util.HashMap] (value [{}]) but failed to remove
> it when the web application was stopped. Threads are going to be renewed
> over time to try and avoid a probable memory leak.
>
> I see that the HashMap is empty but as yet have been unable to figure out:
>
> 1) How this thread local is getting created.
> 2) How to either not create it (or how to remove it).
>
> It is worth mentioning that even though it is not really needed I am
> setting the static singleton due to this issue -
> https://issues.apache.org/jira/browse/SHIRO-457 (I have tried not setting
> it but still get the thread local).
>
> Any help would be greatly appreciated (I will post an update myself if I
> find the root cause).
>
> Cheers,
>
> Stuart
>
>
>

Reply via email to