Bug 51248 - No TLD files were found...
Summary: No TLD files were found...
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.14
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-23 19:01 UTC by austin17427
Modified: 2011-05-23 21:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description austin17427 2011-05-23 19:01:59 UTC
When Tomcat starts, it logs "No TLD files were found" for all the jars of the deployed web project.



Here is an excerpt from catalina log file.

May 23, 2011 1:57:42 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 73220 ms
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/xstream-1.3.1.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/aspectjrt-1.6.8.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/activemq-pool-5.5.0.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/spring-context-support-3.0.5.RELEASE.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/cglib-2.2.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/command-1.0.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: No TLD files were found in [jndi:/localhost/WEB-INF/lib/spring-context-3.0.5.RELEASE.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
May 23, 2011 1:58:17 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
.........................................
Comment 1 austin17427 2011-05-23 19:12:58 UTC
Could potentially related to latest changes at
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
see excerpt below 

add	Add some additional common JARs that do not contain TLDs or web fragments to the list of JARs to skip when scanning for TLDs and web fragments. (markt)
fix	While scanning JARs for TLDs and fragments, avoid using JarFile and use JarInputStream as in most circumstances where JARs are scanned, JarFile will create a temporary copy of the JAR rather than using the resource directly. This change significantly improves startup performance for applications with lots of JARs to be scanned. (markt)
Comment 2 Chuck Caldarale 2011-05-23 19:30:24 UTC
(In reply to comment #0)
> When Tomcat starts, it logs "No TLD files were found" for all the jars of the
> deployed web project.

This is a correct observation, and the INFO log entries also appear to be correct.

What problem are you reporting?
Comment 3 austin17427 2011-05-23 19:53:20 UTC
So, am I supposed to a see bunch of INFO messages each time I start tomcat?
I might as well add those jars to catalina.properties file but that's an additional step, needs deployment changes ..etc. Bottom line, it doesn't make life easier, I think you'll get ton of complaints/questions about this problem.
Is there an easy way to suppress this messages besides adding jars to jarsToSkip list?
Comment 4 Chuck Caldarale 2011-05-23 20:46:53 UTC
(In reply to comment #3)
> So, am I supposed to a see bunch of INFO messages each time I start tomcat?

It's costing you startup time, so you might want to do something about it.

> Is there an easy way to suppress this messages besides adding jars to
> jarsToSkip list?

Try playing with these settings in your <Context> element:

tldNamespaceAware	
tldValidation

(Read the doc first.)

You can always change the logging level.
Comment 5 Mark Thomas 2011-05-23 21:33:58 UTC
This is working as designed. The performance impact of having to needlessly scan JARs for TLDs justifies the INFO message. If you don't want to see it, configure the log level appropriately. The users list can provide assistance if you need help with that.
Comment 6 austin17427 2011-05-23 21:44:42 UTC
Thank you for your answer, it was helpful.