解决Tomcat7“At least one JAR was scanned for TLDs yet contained no TLDs”问题
【Tomcat版本】7.0.42
【问题描述】Tomcat启动后,访问动态页面后提示“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”
【问题原因猜测】Tomcat7/Servlet3.0 新增特性“可插性支持”实现的原理应该是自动扫描jar,当jar中并不包含相关组件时会打印该信息
【问题处理】从提示信息来看,不处理也可以,但对于有洁癖的、追求完美的程序员而言这个是不允许的。具体处理步骤:
1.调整Tomcat对应类的log级别
修改${tomcat}/conf/log4j.properties

- ##解除类org.apache.jasper.compiler.TldLocationsCache的log
- org.apache.jasper.compiler.TldLocationsCache.level = FINE
2.观察Tomcat日志打印信息
步骤1执行完后,重启Tomcat,观察Tomcat日志,会在日志中发现类似如下打印信息:

- 九月 09, 2013 10:55:37 上午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
- 详细: No TLD files were found in [file:/E:/devspace/xxt_login/WEB-INF/lib/json-lib-2.3-jdk15.jar]. Consider adding the JAR to the tomcat.util.scan.DefaultJarScanner.jarsToSkip or org.apache.catalina.startup.TldConfig.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
- 九月 09, 2013 10:55:37 上午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
- 详细: No TLD files were found in [file:/E:/devspace/xxt_login/WEB-INF/lib/poi-3.8.jar]. Consider adding the JAR to the tomcat.util.scan.DefaultJarScanner.jarsToSkip or org.apache.catalina.startup.TldConfig.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
3.调整${tomcat}/conf/catalina.properties,将提示的jar添加到不扫描清单中

- tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
- bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
- annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
- catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
- jasper.jar,jasper-el.jar,ecj-*.jar,\
- tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
- tomcat-jni.jar,tomcat-spdy.jar,\
- tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
- tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
- tomcat-jdbc.jar,\
- tools.jar,\
- commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
- commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
- commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
- commons-math*.jar,commons-pool*.jar,\
- jstl.jar,\
- geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
- ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
- jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
- xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
- junit.jar,junit-*.jar,ant-launcher.jar,\
- json-lib-*.jar,poi-*.jar
【注意】
1.如果使用eclipse server插件、Sysdeo tomcat插件启动Tomcat,此配合可能无效
2.步骤1调整完后,最好清除下以下两个文件夹${tomcat}/conf/Catalina ${tomcat}/work/Catalina
3.尽量使用*号实现模式匹配,以避免因jar版本升级带来的重复修改代价
【参考资料】
Servlet3.0新特性
http://blog.csdn.net/aking21alinjuju/article/details/5583820
转自:http://mov-webhobo.iteye.com/blog/1939655
解决Tomcat7“At least one JAR was scanned for TLDs yet contained no TLDs”问题的更多相关文章
- Tomcat7启动log打印到INFO: At least one JAR was scanned for TLDs yet contained no TLDs.就停止不动了
环境: RHEL7,tomcat7.0.70 问题: 启动tomcat时,catalina.out日志打印到如下内容就停止不动了,也不报错 SEVERE: FarmWarDeployer can on ...
- [转]完美解决)Tomcat启动提示At least one JAR was scanned for TLDs yet contained no TLDs
一.文章前言 本文是亲测有效解决At least one JAR was scanned for TLDs yet contained no TLDs问题,绝对不是为了积分随便粘贴复制然后压根都 ...
- 解决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
在写spring security小程序时遇到 At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug l ...
- 解决At least one JAR was scanned for TLDs yet contained no TLDs. 问题
启动tomcat运行项目时,总是提示: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug loggin ...
- tomcat启动卡在了 At least one JAR was scanned for TLDs yet contained no TLDs 的根本原因与解决办法
1.前言 有时候服务器开启时启动不了,卡在了 org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned fo ...
- Tomcat 8启动速度慢原因1: At least one JAR was scanned for TLDs yet contained no TLDs
最近使用tomcat8启动项目时,发现At least one JAR was scanned for TLDs yet contained no TLDs这一步加载时间非常长, 从网上收集了各种资料 ...
- At least one JAR was scanned for TLDs yet contained no TLDs.
Tomcat提示如下: At least one JAR was scanned for TLDs yet contained no TLDs. =========================== ...
- Tomcat启动慢原因之一 At least one JAR was scanned for TLDs yet contained no TLDs
Tomcat启动时提示: 信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging f ...
- At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger fo
一.文章前言 本文是亲测有效解决At least one JAR was scanned for TLDs yet contained no TLDs问题,绝对不是为了积分随便粘贴复制然后压根都没有用 ...
随机推荐
- css利用padding生成图标
先插入HTML结构: <div class="line-three"></div> <div class="circle"> ...
- BZOJ2408 混乱的置换
这道题即THUSC 2015 t3...只不过数据范围$n, m ≤ 10^5$ 可以上网查这个鬼畜的东西"Burrows-Wheeler Transform" 这道题要用到解压缩 ...
- [CentOS] 解决 crontab 无法读取环境变量的问题
参考资料:http://blog.slogra.com/post-238.html 1. 问题描述 一段数据处理的 shell 程序,在 shell 中手动运行,可以正确执行.但是,把它放在 cron ...
- iOS开发_MVC设计模式
MVC,是一种主流的设计模式,本博文总结一下自己对MVC的看法和理解,浅知拙见,难登大雅之堂,如有欠缺遗漏,还望各位指正. MVC是Model-View-Controller 的缩写,Model 是指 ...
- nodejs 转发websocket (websocket proxy)
const http = require('http') const server = http.createServer((req, res) =>{ res.end('hello world ...
- DataSet集合直接根据传入的类转List<T>集合
最近比较忙,好久没写博客了.个人感觉最好的进步就是写东西.哈哈. 一般我们使用ADO.net从数据库中读取数据返回的集合是DataSet类型的.有时候我们需要进行转换成List<T>集合. ...
- C#注册表的读,写,删除,查找
首先分享一下写入,这个最常用的 public bool WriteRegedit() { try { RegistryKey rk = ...
- [转]查看Flash Log输出
1.安装Debug版本的FlashPlayer 2.mm.cfg配置文件 xp:C:\Documents and Settings\username\mm.cfg Vista/7: C:\users\ ...
- 柏克EPS应急电源签约联达大厦保安全
近日,柏克EPS应急电源成功签约佛山市联达大厦,保障大厦电力安全. 佛山市联达大厦占地6674㎡,总建筑面积约4.6万㎡,设有两层地下室,提供201个停车位,地面29层.大厦大楼分为主楼和副楼,主楼地 ...
- web.config 配置
一.认识Web.config文件 Web.config 文件是一个xml文本文件,它用来储存 asp.NET Web 应用程序的配置信息(如最常用的设置asp.NET Web 应用程序的身份验证方 ...