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