ehcache提问 net.sf.ehcache.store.disk.DiskStore$KeySet

开源之夏第三届火热来袭,高校学生参与赢万元奖金!>>>

ehcache提问 net.sf.ehcache.store.disk.DiskStore$KeySet

信息: Illegal access: this web application instance has been stopped already. Could not load net.sf.ehcache.store.disk.DiskStore$KeySet. 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.DiskStore.keySet(DiskStore.java:521)

at net.sf.ehcache.store.disk.DiskStorageFactory$DiskExpiryTask.run(DiskStorageFactory.java:828)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

回答

俺也遇到了Could not load net.sf.ehcache.store.disk.DiskStore$KeySet这个错误是在什么时候发生的?俺也遇到了,解决了没?tomcat正常启动后,不一会就报出这个错误不知是不是缺少什么包没有引入红薯大哥,在tomcat7出现的问题,切换为tomcat6就没出现这个问题还没有解决吗?

@易轩 这个问题解决了吗?是不是一定要Tomcat6

缺少ehcache.xsd文件,跟ehcache.xml文件放在相同目录下,并在ehcache.xml文件中修改xsi:noNamespaceSchemaLocation="ehcache.xsd"即可,亲测成功!回复
@变种金蛋 : 你说的不对,我是.JAVA文件配置的参数,没有用到xml文件一样会报这个错误http://stackoverflow.com/questions/11842927/java-lang-illegalstateexception-possible-error-with-webclassloader 并参考这个问题中的评论

同问