ICEfaces
  1. ICEfaces
  2. ICE-2990

Seam exception redirecting not working with ICEFaces

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      JBoss 4.2.2.GA, JDK6

      Description

      setting debug mode to false (facelets debug to false in web.xml, seam core debug false, removing seam debug jar)
      adding to home.xhtml a

      <ice:form>
      <ice:commandButton value="NPE" action="#{npe.npe}"/>
      </ice:form>

      and a

      @Name("npe")
      public class NPE {
      public void npe() {
      throw new NullPointerException("npe");
      }
      }

      clicking the NPE hangs the application instead of redirecting according to the catch-all pages.xml exception handler

      debug mode shows redirect to errors.xhtml and block/errors.xhtml but results in hang.

        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment -

          tested on jboss-4.2.3.GA as well. Requires Seam trunk (for Pete's fix) and ICEfaces fix will be in 1.7.2 release

          Show
          Judy Guglielmin added a comment - tested on jboss-4.2.3.GA as well. Requires Seam trunk (for Pete's fix) and ICEfaces fix will be in 1.7.2 release
          Hide
          Ken Fyten added a comment -

          This change is causing regressions in server-push with Seam:

          08:28:18,568 ERROR [STDERR] Exception in thread "Render Thread - 22"
          08:28:18,568 ERROR [STDERR] java.lang.StackOverflowError
          08:28:18,568 ERROR [STDERR] at org.apache.catalina.connector.Request.setAttribute(Request.java:1424)
          08:28:18,568 ERROR [STDERR] at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:503)
          08:28:18,568 ERROR [STDERR] at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:284)
          08:28:18,568 ERROR [STDERR] at com.icesoft.faces.webapp.http.servlet.ServletRequestAttributes.setAttribute(ServletRequestAttributes.java:28)
          08:28:18,568 ERROR [STDERR] at com.icesoft.faces.webapp.http.servlet.ServletEnvironmentRequest.setAttribute(ServletEnvironmentRequest.java:216)
          08:28:18,568 ERROR [STDERR] at com.icesoft.faces.webapp.http.servlet.ServletRequestAttributeMap.setAttribute(ServletRequestAttributeMap.java:25)
          08:28:18,568 ERROR [STDERR] at com.icesoft.faces.context.AbstractCopyingAttributeMap.put(AbstractCopyingAttributeMap.java:22)
          08:28:18,568 ERROR [STDERR] at java.util.Collections$SynchronizedMap.put(Unknown Source)
          08:28:18,568 ERROR [STDERR] at org.jboss.seam.contexts.BasicContext.set(BasicContext.java:85)
          08:28:18,568 ERROR [STDERR] at org.jboss.seam.Component.newInstance(Component.java:2031)

          Show
          Ken Fyten added a comment - This change is causing regressions in server-push with Seam: 08:28:18,568 ERROR [STDERR] Exception in thread "Render Thread - 22" 08:28:18,568 ERROR [STDERR] java.lang.StackOverflowError 08:28:18,568 ERROR [STDERR] at org.apache.catalina.connector.Request.setAttribute(Request.java:1424) 08:28:18,568 ERROR [STDERR] at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:503) 08:28:18,568 ERROR [STDERR] at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:284) 08:28:18,568 ERROR [STDERR] at com.icesoft.faces.webapp.http.servlet.ServletRequestAttributes.setAttribute(ServletRequestAttributes.java:28) 08:28:18,568 ERROR [STDERR] at com.icesoft.faces.webapp.http.servlet.ServletEnvironmentRequest.setAttribute(ServletEnvironmentRequest.java:216) 08:28:18,568 ERROR [STDERR] at com.icesoft.faces.webapp.http.servlet.ServletRequestAttributeMap.setAttribute(ServletRequestAttributeMap.java:25) 08:28:18,568 ERROR [STDERR] at com.icesoft.faces.context.AbstractCopyingAttributeMap.put(AbstractCopyingAttributeMap.java:22) 08:28:18,568 ERROR [STDERR] at java.util.Collections$SynchronizedMap.put(Unknown Source) 08:28:18,568 ERROR [STDERR] at org.jboss.seam.contexts.BasicContext.set(BasicContext.java:85) 08:28:18,568 ERROR [STDERR] at org.jboss.seam.Component.newInstance(Component.java:2031)
          Hide
          Ken Fyten added a comment -

          Seems like the push issues are not related to this issue. New JIRA for those is ICE-3577.

          Marking Fixed again.

          Show
          Ken Fyten added a comment - Seems like the push issues are not related to this issue. New JIRA for those is ICE-3577 . Marking Fixed again.
          Hide
          Judy Guglielmin added a comment -

          for pre jboss-seam-2.1.0.GA releases, you can still do redirection with ICEfaces and Seam by configuring the following:_

          1) in web.xml add the following, and ensure error.xhtml (or whatever extension is defined in context-param = javax.faces.DEFAULT_SUFFIX) is included in the project:-
          <error-page>
          <exception-type>java.lang.Exception</exception-type>
          <location>/error.seam</location>
          </error-page>

          Note that multiple exceptions may be listed going to numerous error pages that are defined.

          2) Add the following to components.xml:-

          <web:exception-filter url-pattern="*.seam"/>

          and define the namespace for web:- xmlns:web="http://jboss.com/products/seam/web" with schema location= http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd

          (for 2.0.x)

          That's it. You can't get the actual value of the exception, but if you defined an error page for each type of exception you wanted to capture as well as a general catch-all, you could have static pages to inform the user what had happened.

          Show
          Judy Guglielmin added a comment - for pre jboss-seam-2.1.0.GA releases, you can still do redirection with ICEfaces and Seam by configuring the following:_ 1) in web.xml add the following, and ensure error.xhtml (or whatever extension is defined in context-param = javax.faces.DEFAULT_SUFFIX) is included in the project:- <error-page> <exception-type>java.lang.Exception</exception-type> <location>/error.seam</location> </error-page> Note that multiple exceptions may be listed going to numerous error pages that are defined. 2) Add the following to components.xml:- <web:exception-filter url-pattern="*.seam"/> and define the namespace for web:- xmlns:web="http://jboss.com/products/seam/web" with schema location= http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd (for 2.0.x) That's it. You can't get the actual value of the exception, but if you defined an error page for each type of exception you wanted to capture as well as a general catch-all, you could have static pages to inform the user what had happened.
          Hide
          Judy Guglielmin added a comment -

          Just to make things clear(er?):-

          what has been explained above is a "workaround" for versions of Seam previous to jboss-seam-2.1.0. The fix has been applied to both jboss-seam-2.1.0 as well as ICEfaces-1.7.2 to enable the seam redirection navigation (dependent on rules defined in pages.xml) to work.

          Show
          Judy Guglielmin added a comment - Just to make things clear(er?):- what has been explained above is a "workaround" for versions of Seam previous to jboss-seam-2.1.0. The fix has been applied to both jboss-seam-2.1.0 as well as ICEfaces-1.7.2 to enable the seam redirection navigation (dependent on rules defined in pages.xml) to work.

            People

            • Assignee:
              Unassigned
              Reporter:
              Nicklas Karlsson
            • Votes:
              10 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: