Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-345

Make it possible for Web Flow to handle errors thrown from within JSF views

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.4
    • Fix Version/s: 2.0 M2
    • Component/s: JSF
    • Labels:
      None

      Description

      Currently,

      During the lifecycle of a JSF+SWF request, SWF is only "in control" of request processing for a portion of the time. View restoration and view rendering, for example, is out of Web Flow's control and under JSF's control. This means SWF cannot handle exceptions thrown during these times.

      This issue exists to track the limitation in exception handling, and should be related to another, broader ticket to put the JSF lifecycle under control of Spring Web Flow.

      Original description:

      While navigation to an non-existing flow (using an old id) I get the following error and the tomcat error page instead of
      the configured errorpage.
      (the gloal-transitions contains <transition on-exception="javax.el.PropertyNotFoundException" to="errorPage" />)

      INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context 'null'
      2007-07-10 17:20:39,453 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition with id 'sellitem-flow'>
      2007-07-10 17:20:39,562 DEBUG [org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter] - <Initializing filter 'Flow System Cleanup Filter'>
      2007-07-10 17:20:39,609 DEBUG [org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter] - <Filter 'Flow System Cleanup Filter' configured successfully>
      10.07.2007 17:21:01 com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
      INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.
      10.07.2007 17:21:01 com.sun.faces.lifecycle.ProcessValidationsPhase execute
      WARNUNG: /categoryForm.xhtml @52,51 value="#

      {sale.category}": Target Unreachable, identifier 'sale' resolved to null
      javax.el.PropertyNotFoundException: /categoryForm.xhtml @52,51 value="#{sale.category}

      ": Target Unreachable, identifier 'sale' resolved to null
      at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:129)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:208)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:185)
      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:936)
      at javax.faces.component.UIInput.validate(UIInput.java:861)
      at javax.faces.component.UIInput.executeValidate(UIInput.java:1071)
      at javax.faces.component.UIInput.processValidators(UIInput.java:663)
      at javax.faces.component.UIForm.processValidators(UIForm.java:229)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1040)
      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:667)
      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemCleanupFilter.java:42)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Unknown Source)
      10.07.2007 17:21:01 com.sun.faces.lifecycle.LifecycleImpl phase
      WARNUNG: executePhase(PROCESS_VALIDATIONS 3,[email protected]) threw exception
      javax.faces.FacesException: /categoryForm.xhtml @52,51 value="#

      {sale.category}": Target Unreachable, identifier 'sale' resolved to null
      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:108)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemCleanupFilter.java:42)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.el.PropertyNotFoundException: /categoryForm.xhtml @52,51 value="#{sale.category}

      ": Target Unreachable, identifier 'sale' resolved to null
      at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:129)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:208)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:185)
      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:936)
      at javax.faces.component.UIInput.validate(UIInput.java:861)
      at javax.faces.component.UIInput.executeValidate(UIInput.java:1071)
      at javax.faces.component.UIInput.processValidators(UIInput.java:663)
      at javax.faces.component.UIForm.processValidators(UIForm.java:229)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1040)
      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:667)
      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
      ... 21 more
      2007-07-10 17:21:01,734 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/swf-sellitem-jsf].[Faces Servlet]] - <Servlet.service() for servlet Faces Servlet threw exception>
      javax.el.PropertyNotFoundException: /categoryForm.xhtml @52,51 value="#

      {sale.category}

      ": Target Unreachable, identifier 'sale' resolved to null
      at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:129)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:208)
      at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:185)
      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:936)
      at javax.faces.component.UIInput.validate(UIInput.java:861)
      at javax.faces.component.UIInput.executeValidate(UIInput.java:1071)
      at javax.faces.component.UIInput.processValidators(UIInput.java:663)
      at javax.faces.component.UIForm.processValidators(UIForm.java:229)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1040)
      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:667)
      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.springframework.webflow.executor.jsf.FlowSystemCleanupFilter.doFilterInternal(FlowSystemCleanupFilter.java:42)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Unknown Source)

      Is this a Bug or can you give me a workaround for this behavoiur?

      THX,
      Mike

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kdonald Keith Donald
              Reporter:
              suckerd Mike
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: