Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1076 | major | always | 04-26-06 19:06 | 05-04-06 14:42 | |
|
|||||
Reporter: | jdane | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.17 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.0.19 | ||
|
|||||
Summary: | 0001076: stack overflow when using spring NestedServletException | ||||
Description: |
This is not really a resin bug so much as an unfortunate interaction between resin's servlet API implementation and the multipart/file upload handling provided by the spring framework. In fact, the problem is probably not restricted to just multipart form handling, but that was the context in which I ran into it. Spring contains a NestedServletException, the purpose of which is summarized in the header of that class as: /** * Subclass of ServletException that properly handles a root cause, * exposing the root cause just like NestedChecked/RuntimeException does. * Note that the plain ServletException doesn't expose its root cause at all, * neither in the exception message nor in printed stack traces! */ and it contains the following method: /** * Return the nested cause, or <code>null</code> if none. */ public Throwable getCause() { // Even if you cannot set the cause of this exception other than through // the constructor, we check for the cause being "this" here, as the cause // could still be set to "this" via reflection: for example, by a remoting // deserializer like Hessian's. return (getRootCause() == this ? null : getRootCause()); } resin's ServletException (unlike tomcat's) calls getCause from its getRootCause, causing instant stack overflow if you try calling either on a NestedServletException. I've reported this as a bug in the Spring Framework bug tracker, and I think the responsibility lies there. But I figured I'd also report the problem here. Perhaps someone might suggest a workaround, because at the moment I'm stumped. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|