You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Carlin Rogers (JIRA)" <ji...@apache.org> on 2007/01/31 17:55:06 UTC

[jira] Resolved: (BEEHIVE-1130) ClassCastException in the DefaultExceptionsHandler when handling JSP rendering exceptions on a direct call to a JSP

     [ https://issues.apache.org/jira/browse/BEEHIVE-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlin Rogers resolved BEEHIVE-1130.
------------------------------------

    Resolution: Fixed
      Assignee: Julie Zhuo  (was: Carlin Rogers)

This is fixed with svn revision 501893. I modified PageFlowPageFilter.handleException() to make the request is wrapped as a PageFlowRequestWrapper so we can mark that an exception is already being handled. The svn commit includes a new TestRecorder test in the coreWeb test app.

> ClassCastException in the DefaultExceptionsHandler when handling JSP rendering exceptions on a direct call to a JSP
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1130
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1130
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2
>            Reporter: Carlin Rogers
>         Assigned To: Julie Zhuo
>             Fix For: V.Next
>
>         Attachments: j1130-repro.zip
>
>
> When a request is made directly to a JSP (not via a page flow) and the rendering of the JSP throws an exception, the PageFlowPageFilter will catch the exception and try to use the DefaultExceptionsHandler. However, the DefaultExceptionsHandler expects the request to be a PageFlowRequestWrapper and calls PageFlowRequestWrapper.get(). In this scenario, the request is not a PageFlowRequestWrapper so the get() method throws either an AssertException (when checking for the PageFlowRequestWrapper) or a ClassCastException when running without asserts.
> Here's an example stack trace...
> java.lang.ClassCastException: org.apache.coyote.tomcat5.CoyoteRequestFacade
>         at org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrapper.get(PageFlowRequestWrapper.java:60)
>         at org.apache.beehive.netui.pageflow.internal.DefaultExceptionsHandler.handleException(DefaultExceptionsHandler.java:110)
>         at org.apache.beehive.netui.pageflow.FlowController.handleException(FlowController.java:272)
>         at org.apache.beehive.netui.pageflow.PageFlowPageFilter.handleException(PageFlowPageFilter.java:440)
>         at org.apache.beehive.netui.pageflow.PageFlowPageFilter.runPage(PageFlowPageFilter.java:354)
>         at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:251)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.