报错信息:
INFO: Illegal access: this web application instance has been stopped already. Could not load org.apache.commons.pool.impl.CursorableLinkedList$Cursor. 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:1599)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at org.apache.commons.pool.impl.CursorableLinkedList.cursor(CursorableLinkedList.java:305)
at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1508)
at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1720)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
问运维工程师是否还有其他报错信息,答无。
根据该报错信息搜索,有一篇文章介绍说,和tomcat的sever.xml和reloadable有关。
原因是因为在tomcat重启的时候,之前的tomcat的线程还没有完全关闭,最新启动tomcat就会报这个异常,只要把tomcat的server.xml 中的reloadable="true" 改成false就OK存在于Context节点中,以下是我截取的Tomcat中文一个文档中的注释:
Context(表示一个web应用程序,通常为WAR文件,关于WAR的具体信息见servlet规范) | docBase | 应用程序的路径或者是WAR文件存放的路径 |
path | 表示此web应用程序的url的前缀,这样请求的url为http://localhost:8080/path/**** | |
reloadable | 这个属性非常重要,如果为true,则tomcat会自动检测应用程序的/WEB-INF/lib 和/WEB-INF/classes目录的变化,自动装载新的应用程序,我们可以在不重起tomcat的情况下改变应用程序 |
进一步检查sever.xml该属性配置正常。
server.log中的报错是easy-schedule的quartz的triggerEntity配置有问题。oa-deploy下的spring-quartz.xml的配置和sys-quartz(easy-schedule)的sping.xml的配置不匹配。
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘oaJobexecutor‘ defined in URL [jar:file:/data/phicomm-oa/tomcat-9999/webapps/oa/WEB-INF/lib/sys-quartz-0.0.1-SNAPSHOT.jar!/com/fx/oa/module/sys/quartz/server/META-INF/spring.xml]: Cannot resolve reference to bean ‘jobDelegate26‘ while setting bean property ‘jobDelegates‘ with key [TypedStringValue: value [jobDelegate26], target type [null]]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘jobDelegate26‘ is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:378)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:161)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 29 more
修复这个问题后,重新启动后系统正常。