Hi, I have been tracking a bug through the webwork and OGNL code for a lot longer than I should have. This has pointed out to me some places where Exception handling could be greatly improved.
The error message reported was only: "org.apache.jasper.JasperException" with no other indication of the cause. I tracked it down to this bit of code in CompundRootAccessor.getProperty(): Object o = iterator.next(); try { if ((OgnlRuntime.hasGetProperty(ognlContext, o, name)) || ((o instanceof Map) && ((Map) o).containsKey(name))) { Object value = OgnlRuntime.getProperty(ognlContext, o, name); ... Some how the top object on the stack was null and this was causing a NPE to be thrown and never caught. In fact there was not even a stack trace due to the fact that the OGNL library (first place the NPE was caught) does not have debug information compiled in. However, the OGNL does "remember" the exception that was thrown like this (from ognl.ASTProperty): Evaluation eval = context.popEvaluation(); eval.setResult(result); if (evalException != null) { eval.setException(evalException); } It looks like it is storing it in an Evaluation object. If the WW2 code could then report this information it would have made my job a LOT easier! I also tracked down the cause of the null object on the top of the stack to another exception handling problem! It was caused by the BeanTag not finding the class it was trying to instantiate. Therefore, a ClassNotFoundException was being thrown but duly ignored: try { pageContext.handlePageException(ex); } catch (Exception e) { // ignore } The JavaDoc for the handlePageException method states: "It is illegal to generate any output to the client, or to modify any ServletResponse state after invoking this call." However, the BeanTag calls this method and then just keeps on processing! It pushes the null object onto the stack. These exception handling issues really make it very difficult to debug. John. ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork