https://issues.apache.org/bugzilla/show_bug.cgi?id=56472
Bug ID: 56472 Summary: All classes remain in memory after stop of web application, when LDAP was used. Product: Tomcat 7 Version: 7.0.52 Hardware: All OS: All Status: NEW Severity: minor Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: stefan_fri...@qvc.com Created attachment 31573 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31573&action=edit Classes that hold a reference to WebappClassLoader I have a problem with unloading casses of a web application when I stop it. All threads are closed, but all 6.000 classes remain in memory. The GC cannot destroy WebappClassLoader because it is held by a static hashMap of the naming services which is hold by the VM. See attached image. The problem occurs only when the application uses the naming service. I identified the first method in my application that triggers the problem: public class MyBindAuthenticator extends BindAuthenticator { ... @Override public DirContextOperations authenticate(Authentication authentication) { ... List<String> userns=getUserDns(username); ... } ... } When I replace this line by a hardcoded list of strings, then the problem gets triggered by the next call of any naming service method. When I replace the whole authenticate() method by an empty one, then the problem disappears. But I need it for security reason. Unfortunately, the problematic hashmap (with name securityTokens) is not accessible to me, so I cannot remove the references. I seems that all related classes are part of Catalina and not reachable from outside. I would appreciate a workaround, if not bugfix is available. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org