You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by paris <pa...@eurocircle.com> on 2003/03/05 19:19:11 UTC

FWD: DO NOT REPLY [Bug 17687] New: -StandardContext resourceStart() error handling does not print stack trace

We keep getting hundreds of these messages from you

---------- Original Message ----------------------------------
From: bugzilla@apache.org
Reply-To: "Tomcat Developers List" <to...@jakarta.apache.org>
Date:  5 Mar 2003 18:13:59 -0000

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17687>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17687

StandardContext resourceStart() error handling does not print stack trace

           Summary: StandardContext resourceStart() error handling does not
                    print stack trace
           Product: Tomcat 4
           Version: 4.1.21
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jbaker@intac.com
                CC: jbaker@intac.com


Discovered on class org.apache.catalina.core.StandardContext (revision 1.115), 
method resourcesStart().

I was installing a web application, using the Apache ANT tasks, that has a 
context with a docbase attribute that is invalid.  The output in the log is:

2003-03-05 12:15:13 StandardContext[/patriot]: Configuring default Resources
* 2003-03-05 12:15:13 StandardContext[/patriot]: Resources start failed:
2003-03-05 12:15:13 StandardContext[/patriot]: Configuring non-privileged 
default Loader
2003-03-05 12:15:13 StandardContext[/patriot]: Configuring default Manager
2003-03-05 12:15:13 StandardContext[/patriot]: Processing standard container 
startup
2003-03-05 12:15:13 StandardContext[/patriot]: Context startup failed due to 
previous errors
2003-03-05 12:15:13 StandardContext[/patriot]: Exception during cleanup after 
start failed

The error occurs around line 2 (which I have marked with an *).  An error is 
generated by the resourcesStart() method, but no stack trace is returned.

Looking at the code, there is a subtle problem with the log output:

---- [StandardContext.java, line 3346] ----
} catch (Throwable t) {
   log(sm.getString("standardContext.resourcesStart", t));
   ok = false;
}
-------------------------------------------

The exception is being handed to the sm.getString() method, and not the log() 
method.  My corrected version looks like this:

---- [StandardContext.java, line 3346] ----
} catch (Throwable t) {
   log(sm.getString("standardContext.resourcesStart"), t );
   ok = false;
}
-------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org