DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 19:12 ---
*** Bug 36252 has been marked as a duplicate of this bug. ***

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 19:29 ---
Guys, you don't need initCause() to fix this problem, nor do you need to change
the interface or specification. All you need to do is implement a method

public Throwable getCause()
{
  return getRootCause();
}

there you go. This code will run on J2EE 1.3 just fine and this is something
that the Tomcat team can do independantly of the specification. I also don't
understand what portability has anything to do with this (maybe you meant
backwards compatibility?). The way I see it, if someone is coding a webapp on
pre-1.3, he can't possibly invoke getCause() because it does not exist. If he
codes his webapp post-1.3, he expects getCause()'s contract to be met and we are
in fact trying to fix ServletException so it meets its contract. There is no
loss of portability or backwards compatibility here. Can I reopen this issue?

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 19:36 ---
(In reply to comment #8)
 in fact trying to fix ServletException so it meets its contract. There is no
 loss of portability or backwards compatibility here. Can I reopen this 
 issue?

No.


-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 19:42 ---
Remy, what is your reasoning for not applying this patch?

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 20:41 ---
I understand the portability issue to be as follows:
- This bug is fixed in Tomcat
- I write code that depends on the fix
- I port my app to another servlet container where the bug is not fixed
- My app is slightly broken

You could make this argument for any bug that exists in more than one servlet
container.

More people have encountered this bug and wasted time tracking it down than will
ever have the hypothetical portability issue.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 20:46 ---
Right! I totally agree. Besides which, I have already reported this issue to Sun
so they will be fixing it (eventually). I don't see any benefit in making
everyone wait a couple of years for this...

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 21:11 ---
This is not a bug - there is no violation of the Servlet spec here. It is an
enhancement request.

To reiterate a point the seems to have been missed, only the servlet spec team
can change the interface or implementation of ServletException.

We could, as suggested, change the Tomcat code to call initCause(). There are 72
or so calls that would need to be added. However, this would break application
portability.

The whole point of having a specification is portability. If we break it for
this, why not for something else? If we do it for this, why shouldn't another
vendor do it for something else. Such a change would be the beginning of a very
nasty slippery slope.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 21:16 ---
Just for the record, I *did* file an enhancement request (see #36252) and it was
closed as a duplicate of this issue... So I guess there is nothing for us to do
but sit on our hands for the next couple of years...

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-18 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-18 21:45 ---
Joshua Bloch recommended making the same change to ServletException as Gili just
did, back in 2000, in anticipation of j2se1.4.
Too bad it was ignored, probably because Joshua Bloch doesn't know anything
about Java.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4395719

Fixing this bug will not violate the spec.  Calling getCause() is undefined
behavior.  It would be more useful if it did the right thing instead of the
wrong thing.  

Furthermore, just because it doesn't violate the servlet spec doesn't mean its
not a bug.  That is a ridiculous position to take.  According to the java spec,
if I am using 1.4 or later, getCause() does the following: - Returns the cause
of this throwable or null if the cause is nonexistent or unknown. -  
By returning null, ServletException is implying that the cause is nonexistent or
unknown, which is not true.  ServletException doesn't adhere to the java spec,
and that is definitely a bug.

Here is another snippet from the javadoc for Throwable.getCause():
- While it is typically unnecessary to override this method, a subclass can
override it to return a cause set by some other means. This is appropriate for a
legacy chained throwable that predates the addition of chained exceptions to
Throwable. -




-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-17 Thread bugzilla
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=36231.
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=36231


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-08-17 19:26 ---
ServletException is defined by the servlet spec and therefore cannot be changed
by the Tomcat team.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-17 Thread bugzilla
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=36231.
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=36231


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2005-08-17 19:33 ---
Firstly, ServletException could be fixed without a change to its interface, and
it would not violate the Servlet spec.  I don't know if the Tomcat team can do
that or not, sounds like maybe not.
Tomcat can and should be fixed independent of ServletException being fixed, and
I stated my opinion of how in the bug description.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-17 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-17 20:09 ---
Only the spec team can change the interface or implementation of any
javax.servlet.* classes.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-17 Thread bugzilla
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=36231.
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=36231


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-08-17 20:22 ---
Servlet v2.4 section SRV.1.2 ends with:

J2SE 1.3 is the minimum version of the underlying Java platform with which
servlet containers must be built.

This minimum prevents using initCause(), which is not available in J2SE 1.3.  
This will be fixable in Servlet v2.5.  Since Tomcat uses the JSR sponsored 
reference implementation, which I think has to stick with the mimimum, I'm 
marking this bug INVALID.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-17 Thread bugzilla
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=36231.
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=36231





--- Additional Comments From [EMAIL PROTECTED]  2005-08-17 20:58 ---
From the 5.5.9 release notes:
Tomcat 5.5 is designed to run on J2SE 5.0 and later, and requires
configuration to run on J2SE 1.4.  Make sure to read the RUNNING.txt 
file in this directory if you are using J2SE 1.4.

I take that to mean Tomcat won't run under java 1.3.  I strongly doubt it is
compiled with jdk1.3 either.

Just to be clear, because I think the point is being missed, the fix I proposed
is for Tomcat to invoke initCause(), until ServletException itself is fixed.  I
won't reopen the bug again, but in my opinion it is not invalid and should be 
fixed.

-- 
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]



DO NOT REPLY [Bug 36231] - getCause() null for ServletException

2005-08-17 Thread bugzilla
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=36231.
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=36231


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Catalina|Servlet  JSP API




--- Additional Comments From [EMAIL PROTECTED]  2005-08-17 21:30 ---
Tomcat 5.5.9 requires 1.4 or later, but the servlet-api.jar it uses is expected 
to be able to run with 1.3, per the spec.  Thus, isn't not feasible to fix 
servlet-api.jar itself.  Tomcat could call initCause() as you suggest, but if 
someone wrote a webapp that depended on getCause() not returning null, the 
webapp would likely not be portable.  This is a case where unnecessarily 
harder is preferred to help ensure the portability of webapps.

Since I would guess that you likely don't care about portability, you could 
customize your Tomcat to fix this.  Simpler may be just to write a utility 
class with a static method that accepts a ServletException and returns the 
cause from getRootCause() or getCause(), which ever is not null.

Updating the component, since this is where the primary issue lies.

-- 
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]