https://issues.apache.org/bugzilla/show_bug.cgi?id=45603

           Summary: StandardWrapper.getRootCause(ServletException) omitting
                    important information
           Product: Tomcat 6
           Version: 6.0.16
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Servlet & JSP API
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


StandardWrapper.getRootCause(ServletException) skips up to 20 exceptions even
if they define getCause(), and in the process omits plenty of information
important for debugging.

For example, I have a servlet that takes an XML document an input. If an
exception is thrown, it wraps it in a second exception which contains a copy of
the request XML document (helping me to reproduce the problem). Unfortunately
StandardWrapper.getRootCause(ServletException) skips the outer exception and
instead only shows me the bottom-most exception. This tells me where the
problem occurred but not what input triggered it...

Please consider modifying StandardWrapper.getRootCause(ServletException) to
return the first exception to return a non-null getCause(), essentially
removing the "loops" variable from the algorithm.

Please consider copying the Servlet API 2.5 reference implementation in
Glassfish that maps "rootCause" into "cause" in ServletException. This approach
leads to fewer problems than the various workarounds that have been implemented
over the years.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to