tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54791] New: No TLD files were found in tools.jar when tools.jar is explicitly added to $CLASSPATH
Date Tue, 02 Apr 2013 20:08:28 GMT

            Bug ID: 54791
           Summary: No TLD files were found in tools.jar when tools.jar is
                    explicitly added to $CLASSPATH
           Product: Tomcat 7
           Version: 7.0.39
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
    Classification: Unclassified

Since r1448831 (7.0.39) tools.jar is no longer mentioned in jarsToSkip

Steps to reproduce
1. Use Eclipse IDE, version for JavaEE developers.
I am using 3.7.2 (Indigo SR2) here.

2. Configure it to use a JDK.

3. Configure a new Server from Tomcat 7.0.39
In Java EE perspective, go to Servers view, right-click, choose "New -> Server"
from context menu.

4. Examine launch configuration of the server.
In Servers view click on the server instance. A new page opens in Editor area.
Click on "Open launch configuration" link there. Go to "Classpath" tab.

Note that the following JARs are in the classpath:
* bootstrap.jar
* tomcat-juli.jar
* tools.jar

5. Deploy a web application on this server and start it.
If you have configured logging (with -Djava.util.logging.config.file in the
same launch configuration dialog), you may see complaints that there are no
TLDs in tools.jar.

02-Apr-2013 18:24:39.637 INFO [main]
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine:
Apache Tomcat/7.0.39
02-Apr-2013 23:08:54.355 FINE [tc-http-2]
org.apache.jasper.compiler.TldLocationsCache.tldScanJar No TLD files were found
in [file:/C:/Program%20Files/Java/jdk1.6.0_43/lib/tools.jar]. Consider adding
the JAR to the tomcat.util.scan.DefaultJarScanner.jarsToSkip or
org.apache.catalina.startup.TldConfig.jarsToSkip property in
CATALINA_BASE/conf/ file.

There are two ways to fix this
a) add "tools.jar" to jarsToSkip property
b) do not scan jars in classpath.

In r1448831 in this b) would be
  stopLoader = ClassLoader.getSystemClassLoader().getParent();
  stopLoader = ClassLoader.getSystemClassLoader();

I see a problem with such a change, though.

I think that there is no need to scan SystemClassLoader's classpath when Tomcat
is launched via Bootstrap class.

I think that we have to scan SystemClassLoader's classpath when launched in
embedded mode via Tomcat class. Is is because it does not set up classloaders
hierarchy like it is done by Bootstrap.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message