title: java.lang.IllegalStateException. Possible error with WebClassLoader
body: <p>I'm developing a web application with Spring and I have this strange error. I can't figure out where it comes from, I've been google'ing hard and found nothing so far.</p>
  
  <p>In the project I'm using: MongoDB, Spring, WSS4J (X.509 security headers for soap), Apache CXF. I've been trying to discover whether there is something that causes this error, any particular action, behaviour, condition something, but I found nothing so far, sometimes it happens after 3 min of running sometimes after 3h or not at all, any clues and hints appreciated.</p>
  
  <pre><code>INFO: Illegal access: this web application instance has been stopped already.  Could not load net.sf.ehcache.store.disk.Segment$1.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
  java.lang.IllegalStateException
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1597)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
      at net.sf.ehcache.store.disk.Segment$HashIterator.&lt;init&gt;(Segment.java:988)
      at net.sf.ehcache.store.disk.Segment.hashIterator(Segment.java:936)
      at net.sf.ehcache.store.disk.DiskStore$HashIterator.&lt;init&gt;(DiskStore.java:1038)
      at net.sf.ehcache.store.disk.DiskStore$KeyIterator.&lt;init&gt;(DiskStore.java:1111)
      at net.sf.ehcache.store.disk.DiskStore$KeyIterator.&lt;init&gt;(DiskStore.java:1111)
      at net.sf.ehcache.store.disk.DiskStore$KeySet.iterator(DiskStore.java:949)
      at net.sf.ehcache.store.disk.DiskStorageFactory$DiskExpiryTask.run(DiskStorageFactory.java:838)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)`
  </code></pre>