Illegal access:this web application instance has been stopped already

来源:互联网 发布:喜迎油价上涨知乎 编辑:程序博客网 时间:2024/06/06 05:48
INFO: Illegal access: this web application instance has been stopped already.  Could not load com.mchange.v2.c3p0.impl.PoolBackedDataSourceBaseBeanInfo.  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.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1777)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:103)
at com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:93)
at com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66)
at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:448)
at java.beans.Introspector.<init>(Introspector.java:398)
at java.beans.Introspector.getBeanInfo(Introspector.java:262)
at java.beans.Introspector.<init>(Introspector.java:407)
at java.beans.Introspector.getBeanInfo(Introspector.java:262)
at java.beans.Introspector.<init>(Introspector.java:407)
at java.beans.Introspector.getBeanInfo(Introspector.java:262)
at java.beans.Introspector.getBeanInfo(Introspector.java:224)
at com.mchange.v2.beans.BeansUtils.extractAccessiblePropertiesToMap(BeansUtils.java:349)
at com.mchange.v2.beans.BeansUtils.appendPropNamesAndValues(BeansUtils.java:324)
at com.mchange.v2.c3p0.ComboPooledDataSource.toString(ComboPooledDataSource.java:539)

at java.lang.String.valueOf(String.java:2994)


原因是:

tomcat重新装载web应用程序失败导致的。当应用程序卸载时,并不会关闭所有的线程。当tomcat已经关闭了其类加载器后,一些线程依然会继续运行,这样就导致出错。不过这个不影响正常使用,不管影响不影响,看到异常信息就不顺眼。

解决方案:修改tomcat目录下的context.xml,找到<Context>标签,把reloadble的属性值设为:reloadable="false",即<Context reloadable="false">。


或者:

解决办法:修改tomcat目录下conf文件夹下的server.xml, 在<Host>标签添加子元素找到<Context>标签,把reloadble的属性值设为:reloadable="false"。


<Context>代表了运行在<Host>上的单个Web应用,一个<Host>可以有多个< Context>元素,每个Web应用必须有唯一的URL路径,这个URL路径在<Context>中的属性path中设定。  
<Context path="/helloApp" docBase="helloApp" debug="0" reloadable="false"/>   


阅读全文
0 0
原创粉丝点击