[
https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Klimetschek updated SLING-571:
----------------------------------------
Attachment: SLING-571-third.patch
And yet another improvement to the previous patches:
- use TagUtil.getRootCause() for ServletException unwrapping
- use rootCause.toString() instead of getMessage(), which is helpful for java
built-in throwables like NoClassDefFoundError that only have the class name as
message - but you need the exception class name as well to know *what* is wrong
with that class ("com/foo/MyClass" vs. "NoClassDefFoundError: com/foo/MyClass"
in the final stacktrace)
- also keep the servletexceptions message in case it is unwrapped (in
JspServletWrapper.handleJspException())
- unwrap nested ScriptEvaluationExceptions (eg. whith nested jsp includes)
> JspServletWrapper swallows jsp exceptions if root cause is null
> ---------------------------------------------------------------
>
> Key: SLING-571
> URL: https://issues.apache.org/jira/browse/SLING-571
> Project: Sling
> Issue Type: Bug
> Components: Scripting JSP
> Affects Versions: Scripting JSP 2.0.2
> Reporter: Tobias Bocanegra
> Assignee: Carsten Ziegeler
> Fix For: Scripting JSP 2.0.4
>
> Attachments: SLING-571-reloaded.patch, SLING-571-third.patch,
> SLING-571.patch
>
>
> For example for a JSP compile error the 'realException' is null and the
> following stack-frame resolution fails:
> (JspServletWrapper.java, line 492ff)
> // First identify the stack frame in the trace that represents
> the JSP
> StackTraceElement[] frames = realException.getStackTrace();
> StackTraceElement jspFrame = null;
> for (int i=0; i<frames.length; ++i) {
> if (
> frames[i].getClassName().equals(this.getServlet().getClass().getName()) ) {
> jspFrame = frames[i];
> break;
> }
> }
> Suggest to check for (realException == null)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.