我是靠谱客的博主 辛勤大米,最近开发中收集的这篇文章主要介绍Tomcat下重新加载class文件报警告信息?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

五月 01, 2018 2:48:28 下午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/jfinal_demo] has started
五月 01, 2018 2:48:28 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [jfinal_demo] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
五月 01, 2018 2:48:28 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [jfinal_demo] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
五月 01, 2018 2:48:28 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [jfinal_demo] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(Unknown Source)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
 java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 java.lang.Thread.run(Unknown Source)
五月 01, 2018 2:48:28 下午 org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
警告: Name = ty Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "5000" for "maxActive" property, which is being ignored.
五月 01, 2018 2:48:28 下午 org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
警告: Name = ty Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
五月 01, 2018 2:48:28 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
五月 01, 2018 2:48:28 下午 org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading
信息: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1355)
	at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1025)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.checkContextClassLoaders(AbandonedConnectionCleanupThread.java:90)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:63)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

五月 01, 2018 2:48:29 下午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/jfinal_demo] is completed
<Context docBase="jfinal_demo" path="/jfinal_demo" reloadable="true" source="org.eclipse.jst.jee.server:jfinal_demo"/>

reloadable="true" 这个异常貌似不太影响,但每次更新代码,都会报异常看着很难受。

网上看到一个说删除项目WebRoot/WEB-INF/lib/下的数据库连接jar包,把jdbc包提取到Tomcat的lib下,异常信息少了很多:

五月 01, 2018 3:08:54 下午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/jfinal_demo] has started
五月 01, 2018 3:08:54 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [jfinal_demo] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
五月 01, 2018 3:08:54 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [jfinal_demo] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Unknown Source)
 java.util.TimerThread.mainLoop(Unknown Source)
 java.util.TimerThread.run(Unknown Source)
五月 01, 2018 3:08:54 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
五月 01, 2018 3:08:54 下午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/jfinal_demo] is completed

但还是不完美!

理想的打印信息应该是这样:

五月 01, 2018 2:48:28 下午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/jfinal_demo] has started
五月 01, 2018 3:14:33 下午 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/jfinal_demo] is completed
有待进一步研究啊……


最后

以上就是辛勤大米为你收集整理的Tomcat下重新加载class文件报警告信息?的全部内容,希望文章能够帮你解决Tomcat下重新加载class文件报警告信息?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部