ICEfaces
  1. ICEfaces
  2. ICE-2493

ICEfaces + Seam ApplicationException: not redirecting properly to error page

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      JBOSS 4.2.1 AS, Seam 2.0.0 GA, ICEfaces 1.6.1 + facelets. Project initially created with IceSeamGen wizard.

      Description

      We are trying to take advantage of annotated ApplicationExceptions to redirect to an appropriate error page, as shown in the Seam documentation. Here's an example annotation:

      @ApplicationException
      @Redirect(viewId="/error.xhtml", message="A location is required.")
      public class LocationContextRequiredException extends Exception {

      I have also tried just declaring the exception handling in the pages.xml. I am throwing the exception from a Seam SessionBean method invoked from an <ice:commandButton>. What I am seeing is that the ExceptionFilter is attempting to redirect to the correct viewId, but the blocking servlet path is getting prepended to the view:

      2007-12-10 10:44:33,949 DEBUG [org.jboss.seam.faces.Navigator] redirecting to: /error.xhtml
      2007-12-10 10:44:35,336 DEBUG [org.jboss.seam.faces.FacesManager] redirecting to: /Phoenix/block/error.xhtml?cid=6

      As described in the forum post the request just dies without any page being rendered. Also, when Seam debug is enabled the SeamDebugHandler has the same problem, thus making it useless.

      2007-12-10 12:27:31,157 DEBUG [org.jboss.seam.faces.FacesManager] redirecting to: /Phoenix/block/debug.xhtml?cid=13

      I have manually changed the redirect path value in the debugger prior to the the call to externalContext.redirect() in the FacesManager, but it makes no difference. As far as I can tell the entire Seam ExceptionHandler hierarchy does not function when using ICEfaces. I see ICE-1133 supposedly fixed a related problem, however I don't see those modifications (ViewBoundAdaptingServlet) in version 1.6.1

      At the very least we were hoping to be able to handle the following exceptions:

      org.jboss.seam.framework.EntityNotFoundException
      javax.persistence.EntityNotFoundException
      javax.persistence.OptimisticLockException
      org.jboss.seam.security.AuthorizationException
      org.jboss.seam.security.NotLoggedInException
      javax.faces.application.ViewExpiredException

        Activity

        Hide
        Judy Guglielmin added a comment -

        see ICE-2990. Fixed in ICEfaces-1.7.2 release.

        Show
        Judy Guglielmin added a comment - see ICE-2990 . Fixed in ICEfaces-1.7.2 release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Denise Ketcham
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: