[jboss-jira] [JBoss JIRA] (JBWEB-211) Jasper Parser drops exception root cause

Remy Maucherat (JIRA) jira-events at lists.jboss.org
Fri May 11 12:16:18 EDT 2012


     [ https://issues.jboss.org/browse/JBWEB-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remy Maucherat resolved JBWEB-211.
----------------------------------

    Fix Version/s: JBossWeb-7.0.9.GA
       Resolution: Done


Not fixed in the 2.1 branch though.
                
> Jasper Parser drops exception root cause
> ----------------------------------------
>
>                 Key: JBWEB-211
>                 URL: https://issues.jboss.org/browse/JBWEB-211
>             Project: JBoss Web
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tomcat
>    Affects Versions: JBossWeb-2.1.9.GA
>         Environment: All
>            Reporter: Andrew Sacamano
>            Assignee: Remy Maucherat
>            Priority: Minor
>              Labels: exception_handling
>             Fix For: JBossWeb-7.0.9.GA
>
>
> Line 342 in of java/org/apache/jasper/compiler/Parser.java (see below) commits one of the cardinal sins of exception handling - it drops the original stack trace, and original root causes.
> This has contributed to the premature grey hair of one of our sysadmins, as he tries to sort out why a particular tag is causing the JSP compiler to puke.
>  327
>  328     /*
>  329      * Invokes parserController to parse the included page
>  330      */
>  331     private void processIncludeDirective(String file, Node parent)
>  332             throws JasperException {
>  333         if (file == null) {
>  334             return;
>  335         }
>  336
>  337         try {
>  338             parserController.parse(file, parent, jarFileUrl);
>  339         } catch (FileNotFoundException ex) {
>  340             err.jspError(start, "jsp.error.file.not.found", file);
>  341         } catch (Exception ex) {
>  342             err.jspError(start, ex.getMessage());
>  343         }
>  344     }
>  345
> It looks like there is a bit of work involved to craft a better response, perhaps adding another jspError variant - but surely the actual exception is important enough to go through the effort.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list