ICEfaces
  1. ICEfaces
  2. ICE-3951

jsf page not working when not defined in spring webflow

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Springwebflow 2.0.3
      Iceface 1.7.2
      facelets
      JSF
      glassfish v2

      Description

      I am using spring webflow 2.0.3 and icefaces 1.7.2. Icefaces and springwebflow is worken fine when navigation is defined in the spring webflow.
      However I have jsf page not defined in spring webflow. It works fine without any icefaces component. When I add icefaces form I got the following exception

      javax.faces.FacesException: Problem in renderResponse: null
              at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:294)
              at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
              at com.icesoft.faces.context.View$2.respond(View.java:44)
              at com.icesoft.faces.webapp.http.servlet.GlassFishAdaptingServlet$GlassFishRequestResponse.respondWith(GlassFishAdaptingServlet.java:159)
              at com.icesoft.faces.context.View.servePage(View.java:274)
              at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:62)
              at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
              at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
              at com.icesoft.faces.webapp.http.servlet.GlassFishAdaptingServlet.service(GlassFishAdaptingServlet.java:60)
              at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
              at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:276)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
              at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)
              at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:192)
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:404)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
              at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
              at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
              at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:547)
              at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:299)
              at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
              at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
              at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
              at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
              at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
              at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
      Caused by: java.lang.NullPointerException
              at com.icesoft.util.SeamUtilities.getSpringFlowId(SeamUtilities.java:521)
              at com.icesoft.faces.renderkit.dom_html_basic.FormRenderer.encodeBegin(FormRenderer.java:150)
              at com.icesoft.faces.component.ext.renderkit.FormRenderer.encodeBegin(FormRenderer.java:53)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:568)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
              at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
              ... 53 more

      I found in line 512 in SeamUtilities file that RequestContextHolder.getRequestContext() returns null.
      Can Icefaces skip getting the flowexecutionkey when I am runing jsf page not define in spring webflow even if the spring environment is loaded ?

        Activity

        Hide
        Pavel added a comment -

        Retested with ICEfaces 1.8.0 and 1.8.2 and Web Flow 2.0.5 and the problem is the same.

        I tried the following patch of SeamUtilities.java with ICEfaces 1.8.0_12 and both the JSFs with and without Web Flow seem to work fine:

        bash-3.2$ diff -u SeamUtilities.orig.java SeamUtilities.java
        — SeamUtilities.orig.java Wed Sep 24 12:44:12 2008
        +++ SeamUtilities.java Tue Oct 06 11:01:25 2009
        @@ -518,8 +518,10 @@
        flowIdParameterName = "_flowExecutionKey";
        }
        } else if (2 == springLoaded) {

        • value = RequestContextHolder.getRequestContext()
        • .getFlowExecutionContext().getKey().toString();
          + if (RequestContextHolder.getRequestContext() != null && RequestContextHolder.getRequestContext().getFlowExecutionContext() != null &&
          + RequestContextHolder.getRequestContext().getFlowExecutionContext().getKey() != null) { + value = RequestContextHolder.getRequestContext().getFlowExecutionContext().getKey().toString(); + }

          if (null != value) {
          //Spring Web Flow 2.x confirmed
          flowIdParameterName =

        Is it possible to test this patch and add it to the next release of ICEfaces, if it is OK?

        Show
        Pavel added a comment - Retested with ICEfaces 1.8.0 and 1.8.2 and Web Flow 2.0.5 and the problem is the same. I tried the following patch of SeamUtilities.java with ICEfaces 1.8.0_12 and both the JSFs with and without Web Flow seem to work fine: bash-3.2$ diff -u SeamUtilities.orig.java SeamUtilities.java — SeamUtilities.orig.java Wed Sep 24 12:44:12 2008 +++ SeamUtilities.java Tue Oct 06 11:01:25 2009 @@ -518,8 +518,10 @@ flowIdParameterName = "_flowExecutionKey"; } } else if (2 == springLoaded) { value = RequestContextHolder.getRequestContext() .getFlowExecutionContext().getKey().toString(); + if (RequestContextHolder.getRequestContext() != null && RequestContextHolder.getRequestContext().getFlowExecutionContext() != null && + RequestContextHolder.getRequestContext().getFlowExecutionContext().getKey() != null) { + value = RequestContextHolder.getRequestContext().getFlowExecutionContext().getKey().toString(); + } if (null != value) { //Spring Web Flow 2.x confirmed flowIdParameterName = Is it possible to test this patch and add it to the next release of ICEfaces, if it is OK?

          People

          • Assignee:
            Unassigned
            Reporter:
            Aymangh Elgharabawy
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: