You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/07/15 12:41:32 UTC

[jira] Created: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

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


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.


[jira] Resolved: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-571.
------------------------------------

       Resolution: Fixed
    Fix Version/s: Scripting JSP 2.0.4

Thanks for the patch - it's applied.
Please close the bug if it fixes the problems.

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


[jira] Reopened: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reopened SLING-571:
------------------------------------


Reopen this bug so we don't forget it 

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


[jira] Commented: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674822#action_12674822 ] 

Alexander Klimetschek commented on SLING-571:
---------------------------------------------

@Felix: I think I removed the "Stacktrace:" strings because they looked "ugly" in the output and it was somewhat obvious that these are stacktraces or the word stacktrace was duplicated in the end. Unfortunately I don't have the original testing situation anymore - I think it was something nasty like a jsp compile exception in the 404 error handler.

@Carsten: I will take a look at it. Basically it should be the 4 points mentioned in my comment for the third patch, probably without the removal of the "Stacktrace:" strings if you favor them.

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


[jira] Updated: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ 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

Updated the third patch to add:

- remove "Stacktrace:" at the end of JSP compile error messages

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


[jira] Updated: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ 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.patch

Uploaded patch that fixes both NPEs and the ScriptException issue.

> 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
>         Attachments: 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.


[jira] Closed: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-571.
----------------------------------

    Resolution: Fixed

I've applied your patch in revision 746782. Thanks Alexander.
If any other problems arise we should open a new bug.

> 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-fourth.patch, 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.


[jira] Updated: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ 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-reloaded.patch

A second patch that tries to provide a full exception chain by unpacking ServletException and fetching the rootCause.

Background: ServletExceptions do not use the normal "cause" of exceptions (which is used for exception chaining, ie. when printing the full stacktrace), but introduce their own "rootCause" member. So once an exception chain comes to a ServletException, it effectively stops.

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


[jira] Updated: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ 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-fourth.patch

Fourth patch based on current trunk, simply recreated from my local modifcations, ie. same as the third patch (incl. stackrace: changes).

> 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-fourth.patch, 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.


[jira] Updated: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated SLING-571:
----------------------------------------

    Attachment:     (was: SLING-571-third.patch)

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


[jira] Commented: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622187#action_12622187 ] 

Alexander Klimetschek commented on SLING-571:
---------------------------------------------

Experienced the same issue when a jsp had compilation errors that got completely swallowed. The NPE above was only 1 of 3 issues that were roadblocks:

2) There is also a NPE in the ErrorDispatcher.createJavacError() method, where the passed "page" parameter can be null (ie. if there was a script compile error and the parsed script tree = page is null).

3) And finally the javax.script.ScriptException (eg. here http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/bsf-api/src/main/java/javax/script/ScriptException.java?view=markup) swallows the message of the causing exception when using the constructor with just the causing exception (in JspScriptEngineFactory.JspScriptEnginge.eval()).

> 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
>         Attachments: 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.


[jira] Assigned: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned SLING-571:
--------------------------------------

    Assignee: Carsten Ziegeler

> 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
>         Attachments: 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.


[jira] Updated: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Commented: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667218#action_12667218 ] 

Felix Meschberger commented on SLING-571:
-----------------------------------------

I do not understand, why the patch removes "Stacktrace:" strings. Can you please enlighten me ? Thanks.

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


[jira] Commented: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674800#action_12674800 ] 

Carsten Ziegeler commented on SLING-571:
----------------------------------------

Hi Alex, the patch is not up to date anymore, so can you please come up with a new patch?

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


[jira] Commented: (SLING-571) JspServletWrapper swallows jsp exceptions if root cause is null

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622259#action_12622259 ] 

Carsten Ziegeler commented on SLING-571:
----------------------------------------

Ok, thanks Alex for your second patch.

Please close the bug if everything is fine now.

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