tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter <peterdni...@yahoo.com>
Subject Re: rc-10 bug?
Date Mon, 06 Jan 2014 19:59:08 GMT
Thanks to an email from Martin, I had a strong indicator of where to look. I checked out tomcat
8 from trunk and  validated in eclipse in debug mode. (FYI build.properties.default is broken
due to missing commons pool, had to tweak a bit).

From webappclassloader.java snippet below (line 737), jars[] does not only contain jars, but
also any other resources. i added a howTo.txt file in WEB-INF/lib, which results in  jars.length
will NEVER equal jarModificationTimes.size().

Fix is simple - just filter out the non-jar, non-executable elements b4 comparing. Workaround
is equally trivial - remove said elements from the the lib folder.
Hope this helps,
Peter



        // Check if JARs have been added or removed
        WebResource[] jars = resources.listResources("/WEB-INF/lib");

        if (jars.length > jarModificationTimes.size()) {
            log.info(sm.getString("webappClassLoader.jarsAdded",
                    resources.getContext().getName()));
            return true;
        } else if (jars.length < jarModificationTimes.size()){
            log.info(sm.getString("webappClassLoader.jarsRemoved",
                    resources.getContext().getName()));
            return true;
        }

        for (WebResource jar : jars) {
            if (jar.getName().endsWith(".jar") && jar.isFile() &&
jar.canRead()) {

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message