四月 20, 2016 1:18:30 下午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already. Could not load org.quartz.StatefulJob. 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:1610)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.quartz.JobDetail.class$(JobDetail.java:279)
at org.quartz.JobDetail.isStateful(JobDetail.java:425)
at org.quartz.simpl.RAMJobStore.triggerFired(RAMJobStore.java:1312)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:342)
Exception in thread "QuartzScheduler_QuartzSchedulerThread" java.lang.NoClassDefFoundError: org.quartz.StatefulJob
at org.quartz.JobDetail.class$(JobDetail.java:279)
at org.quartz.JobDetail.isStateful(JobDetail.java:425)
at org.quartz.simpl.RAMJobStore.triggerFired(RAMJobStore.java:1312)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:342)
以上的报错信息挨个查找,分别汇总为以下可能情况
1、tomcat 自启动问题 ,将server.xml重新配置为 reload=false ,依旧没有解决问题
2、内存溢出,将Tomact的内存设置变大以后,依旧没有解决的问题
3、类丢失,尝试重新加载JAR包,包括项目和Tomact的,依旧没有解决的问题
解决方案:
上面的报错信息看上去特别像是没有找到类,但是实际去TOMACT/LOGS/host-xx.xx.xx目录下查看日志信息的时候,发现并不是这个错误,而是我一个代码处理的问题。
TOMACT/LOGS目录下的日志信息,才是你真正的错误原因,祝好运!
附:如何打印出LOGS下的日志信息
点击打开链接