Bug 31549 - Log message does not tell which class it tried to load when loading fails because webapp is stopped
Log message does not tell which class it tried to load when loading fails bec...
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
5.0.28
All All
: P3 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
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.