DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39088>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39088 Summary: StandardWrapper getRootCause() infinite loop Product: Tomcat 5 Version: 5.5.9 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P3 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] The "// Extra aggressive rootCause finding" in StandardWrapper.java is an understatement. It causes an infinite loop in certain cases. For example, the semantics of the following exception class are that getRootCause() returns the one and only root cause of the exception chain, which in this case can be the exception itself. It is not derived from ServletException, thus is not bound to return null at the end of the chain as ServletException does. Its not safe to use reflection to call an arbitrary method of an arbitrary Exception class, just because it happens to have the same name as the method in ServletException. public class MyException extends Exception { public MyException(Throwable cause) { this.cause = cause; } Throwable cause; public Throwable getCause() { return cause; } public Throwable getRootCause() { if (cause instanceof VCOMException) { return ((VCOMException) exception).getRootCause(); } return cause == null ? this : cause; } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]