tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15974] New: - Original stack trace is lost
Date Fri, 10 Jan 2003 20:12:06 GMT
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=15974>.
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=15974

Original stack trace is lost

           Summary: Original stack trace is lost
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: tomy@softwaredesign.com.br


Hi,

It seems that when an exception reaches the Jasper from an application, the 
component throws the root cause's stack trace away, keeping only the 
exception's message, which in some cases is not sufficient for the programmer 
to find the problem.

I believe this change (possibly a bug) has been made since early versions of 
Tomcat 4.x, as the Tomcat 3.3a shows the complete stack trace.

To isolate and demonstrate the problem, I've created a simple application, 
which consists of a Java class, and a JSP:

-- Java class source code --

package com.test;

public class StackTraceTest {
    public static void throwError() throws Exception {
        if (1 == 1) throw new Exception("just testing");
    }
}
--

-- JSP source code --
<% com.test.StackTraceTest.throwError(); %>
--

On Tomcat 4.1.18 (think early versions of 4.x does the same), it produces the 
following content, in the browser and in the log:

--
HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 

org.apache.jasper.JasperException: just testing
    at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:248)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:493)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:432)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:386)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:534)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:530)
    at java.lang.Thread.run(Thread.java:479)


root cause 

javax.servlet.ServletException: just testing
    at org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:533)
    at org.apache.jsp.myError_jsp._jspService(myError_jsp.java:49)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:204)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:493)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:432)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:386)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:534)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:530)
    at java.lang.Thread.run(Thread.java:479)

Apache Tomcat/4.1.18
--

On the Tomcat 3.3a, the result is:

--
Error: 500
Location: /eadweb/myError.jsp
Internal Servlet Error:

javax.servlet.ServletException: just testing
	at org.apache.jasper.runtime.PageContextImpl.handlePageException
(Unknown Source)
	at myError_2._jspService(myError_2.java:63)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at org.apache.tomcat.modules.server.Http10Interceptor.processConnection
(Unknown Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(Unknown Source)
	at java.lang.Thread.run(Thread.java:479)
Root cause:
java.lang.Exception: just testing
	at com.eadweb.StackTraceTest.throwError(StackTraceTest.java:5)
	at myError_2._jspService(myError_2.java:53)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at org.apache.tomcat.modules.server.Http10Interceptor.processConnection
(Unknown Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(Unknown Source)
	at java.lang.Thread.run(Thread.java:479)

--

As you can see, on the 4.1.18 version, the root cause does not show the stack 
trace entering the "throwError" method of the class, as does the 3.3a version. 
In some cases, it's very important to know the complete root cause's stack 
trace, as the Tomcat internal's stack trace doesn't give me much information.

Thanks,
Tomy Inhauser

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


Mime
View raw message