Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 90384 invoked from network); 5 Feb 2003 15:25:54 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 5 Feb 2003 15:25:54 -0000 Received: (qmail 11857 invoked by uid 97); 5 Feb 2003 15:27:23 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 11850 invoked from network); 5 Feb 2003 15:27:22 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 5 Feb 2003 15:27:22 -0000 Received: (qmail 84676 invoked by uid 500); 5 Feb 2003 15:24:27 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 84618 invoked from network); 5 Feb 2003 15:24:27 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 5 Feb 2003 15:24:27 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18gRNb-0004K9-00 for ; Wed, 05 Feb 2003 16:22:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-dev@jakarta.apache.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18gRNb-0004Jz-00 for ; Wed, 05 Feb 2003 16:22:27 +0100 From: Costin Manolache Subject: Re: [PATCH] Root cause lost in Jsp and ServletException Date: Wed, 05 Feb 2003 07:18:03 -0800 Lines: 99 Message-ID: References: <3E411716.5000104@mail.more.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.2 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ops... Sorry - you're right. There is a way to make it compatible with both 1.3- and 1.4 - but it would require changing the interface, so probably need to send feedback to the jcp... ( adding a Throwable getCause() to the interface would make the stack traces work again ). Costin Glenn Nielsen wrote: > BTW, this does not build with JDK's < 1.4 and if you use a servlet.jar > built with 1.4 in a JVM <1.4 you get a NoSuchMethodError. > > This change for jakarta-servletapi-4 need to reverted for now. > > Glenn > > > Costin Manolache wrote: >> this is for servetapi_4. >> >> Same applies to servletapi_5 ( I already sent a patch few weeks ago ). >> >> The problem is that JDK1.4 stack traces can't find the root cause. >> >> AFAIK nothing in the servlet or JSP specs requires breaking the normal >> contract for exceptions - which is to pass the root cause to the parent. >> >> Costin >> >> Index: src/share/javax/servlet/ServletException.java >> =================================================================== >> RCS file: >> /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/ServletException.java,v >> retrieving revision 1.1.1.1 >> diff -u -r1.1.1.1 ServletException.java >> --- src/share/javax/servlet/ServletException.java 9 Jan 2001 >> 03:24:16 -0000 1.1.1.1 >> +++ src/share/javax/servlet/ServletException.java 4 Feb 2003 >> 19:00:30 -0000 @@ -129,7 +129,7 @@ >> */ >> >> public ServletException(String message, Throwable rootCause) { >> - super(message); >> + super(message, rootCause); >> this.rootCause = rootCause; >> } >> >> @@ -158,7 +158,7 @@ >> */ >> >> public ServletException(Throwable rootCause) { >> - super(rootCause.getLocalizedMessage()); >> + super(rootCause.getLocalizedMessage(), rootCause); >> this.rootCause = rootCause; >> } >> >> Index: src/share/javax/servlet/jsp/JspException.java >> =================================================================== >> RCS file: >> /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/jsp/JspException.java,v >> retrieving revision 1.1.1.1 >> diff -u -r1.1.1.1 JspException.java >> --- src/share/javax/servlet/jsp/JspException.java 9 Jan 2001 >> 03:24:20 -0000 1.1.1.1 >> +++ src/share/javax/servlet/jsp/JspException.java 4 Feb 2003 >> 19:00:31 -0000 @@ -106,7 +106,7 @@ >> */ >> >> public JspException(String message, Throwable rootCause) { >> - super(message); >> + super(message, rootCause); >> this.rootCause = rootCause; >> } >> >> @@ -132,7 +132,7 @@ >> */ >> >> public JspException(Throwable rootCause) { >> - super(rootCause.getLocalizedMessage()); >> + super(rootCause.getLocalizedMessage(), rootCause); >> this.rootCause = rootCause; >> } >> >> >> >> --------------------------------------------------------------------- >> 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