【问题标题】:about errors while starting or stopping tomcat关于启动或停止tomcat时的错误
【发布时间】:2021-01-16 07:47:58
【问题描述】:

我在重新启动我的 tomcat 或停止我的 tomcat 服务器时收到这些警告和错误。它不会干扰我的项目,但我想这是一个严重的问题,而没有。用户增长。

P.S.我用hibernate做数据库连接,用显示标签库做显示表,用过jsp/servlet。

INFO: Illegal access: this web application instance has been stopped already.  Could not load com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.  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:1600)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
        at com.mchange.v2.resourcepool.BasicResourcePool.checkIdleResources(BasicResourcePool.java:1481)
        at com.mchange.v2.resourcepool.BasicResourcePool.access$2000(BasicResourcePool.java:32)
        at com.mchange.v2.resourcepool.BasicResourcePool$CheckIdleResourcesTask.run(BasicResourcePool.java:1964)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)

Exception in thread "Timer-0" java.lang.NoClassDefFoundError: com/mchange/v2/resourcepool/BasicResourcePool$AsyncTestIdleResourceTask
    at com.mchange.v2.resourcepool.BasicResourcePool.checkIdleResources(BasicResourcePool.java:1481)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$2000(BasicResourcePool.java:32)
    at com.mchange.v2.resourcepool.BasicResourcePool$CheckIdleResourcesTask.run(BasicResourcePool.java:1964)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 5 more
May 27, 2014 5:20:39 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/ZestYouth] has started
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
May 27, 2014 5:20:40 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/ZestYouth] is completed

【问题讨论】:

  • 看起来你的 tomcat/project 中缺少 c3p0-x.y.z.jar
  • 谢谢 jens 但这个罐子是干什么用的?我已经包含了 c3p0-0.9.1.jar
  • 这是一个连接池的框架see here
  • 我已经包含了 c3p0-0.9.1.jar..
  • 它在tomcat的类路径中?

标签: java hibernate jsp tomcat7 displaytag


【解决方案1】:

检查您的 webapp 的 JAR 是否与服务器的 JAR 不冲突...

在处理数据源时有时会发生这种情况,而 NoClassDefFOund 有时可能意味着“未找到唯一的类定义”

【讨论】:

  • 感谢我找到了解决方案..我插入了两个较低版本和较高版本的 jar 文件..意味着我插入了 slf4j-api-1.5.8.jar 和 slf4j-api-1.4.1.jar 文件我还插入了显示标签 1.2 和 1.1。
猜你喜欢
  • 2012-09-04
  • 1970-01-01
  • 2019-03-02
  • 1970-01-01
  • 2012-03-02
  • 2010-12-13
  • 2019-06-30
  • 1970-01-01
相关资源
最近更新 更多