Comment Re:SkyNet (Score 3, Informative) 192
As the other reply alluded this isn't a JVM problem but a problem with poorly written libraries. If a library sticks something in a ThreadLocal, creates a Thread, registers a JDBC driver, or several other tasks using classes from the webapp class loader and then DOESN'T CLEAN THEM UP when the webapp context is destroyed you get a ClassLoader leak. Just like any other Java memory leak it stems from having classes in the loader still reachable from the GC root.
Tomcat has made some great changes to their webapp classloader to watch for this bad behavior and forcibly remove/cleanup these references when a webapp shuts down, solving this problem in many cases.