Bug 31549 - Log message does not tell which class it tried to load when loading fails because webapp is stopped
Summary: Log message does not tell which class it tried to load when loading fails bec...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.28
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-05 14:49 UTC by Frank Spies
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Spies 2004-10-05 14:49:05 UTC
When the WebappClassLoader tries to load a class and the webapp it belongs to is
already shut down, it outputs a diffuse warning that it could not a class,
without mentioning the name of the class.

I would suggest to change the following:
*in org/apache/catalina/loader/WebappClassLoader.java:
  * change in loadClass(String name, boolean resolve):
if (!started) {
            log.info(sm.getString("webappClassLoader.stopped"));
            throw new ThreadDeath();
        }
  to
if (!started) {
            log.info(sm.getString("webappClassLoader.stopped"), name);
            throw new ThreadDeath();
        }

  * change in findResourceInternal(String name, String path):
if (!started) {
            log.info(sm.getString("webappClassLoader.stopped"));
            return null;
        }
  to
if (!started) {
            log.info(sm.getString("webappClassLoader.stopped"), name);
            return null;
        }
*in org/apache/catalina/loader/WebappClassLoader.java:
  * change
webappClassLoader.stopped=Illegal access: this web application instance has been
stopped already (the eventual following stack trace is caused by an error thrown
for debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact)
  to
webappClassLoader.stopped=Illegal access: this web application instance has been
stopped already. Could not load {0}. The eventual following stack trace is
caused by an error thrown for debugging purposes as well as to attempt to
terminate the thread which caused the illegal access, and has no functional impact.
Comment 1 Yoav Shapira 2004-10-05 16:32:59 UTC
Done for Tomcat 5.0, doing 5.5 next.
Comment 2 Yoav Shapira 2004-10-05 16:38:45 UTC
Done for 5.5 also.