解决Tomcat7“At least one JAR was scanned for TLDs yet contained no TLDs”问题

解决Tomcat7“At least one JAR was scanned for TLDs yet contained no TLDs”问题

2013-12-05 21:58:00|  分类: tomcat |举报 |字号 订阅

下载LOFTER 我的照片书  |

【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

Java代码  

  1. ##解除类org.apache.jasper.compiler.TldLocationsCache的log
  2. org.apache.jasper.compiler.TldLocationsCache.level = FINE

 2.观察Tomcat日志打印信息

步骤1执行完后,重启Tomcat,观察Tomcat日志,会在日志中发现类似如下打印信息:

Java代码  

  1. 九月 09, 2013 10:55:37 上午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
  2. 详细: 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.
  3. 九月 09, 2013 10:55:37 上午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
  4. 详细: 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添加到不扫描清单中

Java代码  

  1. tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
  2. bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
  3. annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
  4. catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
  5. jasper.jar,jasper-el.jar,ecj-*.jar,\
  6. tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
  7. tomcat-jni.jar,tomcat-spdy.jar,\
  8. tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
  9. tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
  10. tomcat-jdbc.jar,\
  11. tools.jar,\
  12. commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
  13. commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
  14. commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
  15. commons-math*.jar,commons-pool*.jar,\
  16. jstl.jar,\
  17. geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
  18. ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
  19. jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
  20. xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
  21. junit.jar,junit-*.jar,ant-launcher.jar,\
  22. 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

时间: 2024-10-15 15:58:06

解决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 only work as host cluster subelement! Dec 02, 2016 4:27:39 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /

解决报错问题: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 during scanning can improve startup t

Tomcat启动/关闭的时候,遇到At least one JAR was scanned for TLDs yet contained no TLDs问题的解决办法

1.控制台错误提示如下: At least one JAR was scanned for TLDs yet contained no TLDs 07-Mar-2017 11:00:21.970 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable

解决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 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 sta

解决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 JAR

在写spring mvc小程序时遇到 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 star

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 d

问题描述 在tomcat启动时打印出一句error日志,内容为: 24-Jul-2017 11:28:33.486 信息 [RMI TCP Connection(4)-127.0.0.1] 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 compl

解决At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this log

pom增加:<dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version></dependency>

At least one JAR was scanned for TLDs yet contained no TLDs.

Tomcat报错如下: ========================================================================= 解决方案: 打开Tomcat\conf\catalina.properties,加上 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\*.jar 如果还是不能解决.详情参考StackOverFlow: https://stackoverflow.com/questions/

如何解决Maven和SBT下载Jar包太慢

国内:如何解决Maven和SBT下载Jar包太慢 Maven 远程仓库 <mirror> <id>ui</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror