ICEfaces
  1. ICEfaces
  2. ICE-10392

Portlet failing during navigation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: EE-4.0.0.GA, 4.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Liferay Portlet
    • Assignee Priority:
      P2

      Description

      In trying to upgrade their portlet demos to use ICEFaces 4, Liferay ran into a problem. They were in the process of converting the demo located here:

      https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/icefaces3-portlet

      In that demo, when you finish entering information into the initial application view and click submit, the server throws and exception and the portlet is no longer usable.

        Activity

        Hide
        Deryk Sinotte added a comment -

        Clicking the button leads to the following exception on the server:

        19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[ICEfacesSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.BridgeSetup$1]
        19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[JavaScriptRunnerSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.JavaScriptRunnerSetup$1]
        19:18:26,449 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[null] library=[null] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.util.CachingHeadersSetup$1]
        java.lang.NullPointerException
        	at org.icefaces.impl.util.DOMUtils.printNode(DOMUtils.java:298)
        	at org.icefaces.impl.util.DOMUtils.printNodeCDATA(DOMUtils.java:286)
        	at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:208)
        	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
        	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
        	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
        	at com.liferay.faces.util.context.PartialViewContextOnChangeImpl.processPartial(PartialViewContextOnChangeImpl.java:105)
        	at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004)
        	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
        	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430)
        	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
        	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
        	at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:52)
        	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
        	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
        	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
        	at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:107)
        	at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:133)
        	at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178)

        The most relevant cases I could find are:

        http://jira.icesoft.org/browse/ICE-8379
        http://jira.icesoft.org/browse/ICE-10282

        Mircea made a tweak to the fix in ICE-8379 as part of ICE-9679. The original fix in ICE-8379 was done to help with non-redirect navigation as that's what there example does. None of our samples use navigation so it easy for us to miss impacts in that area.

        Show
        Deryk Sinotte added a comment - Clicking the button leads to the following exception on the server: 19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[ICEfacesSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.BridgeSetup$1] 19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[JavaScriptRunnerSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.JavaScriptRunnerSetup$1] 19:18:26,449 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[null] library=[null] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.util.CachingHeadersSetup$1] java.lang.NullPointerException at org.icefaces.impl.util.DOMUtils.printNode(DOMUtils.java:298) at org.icefaces.impl.util.DOMUtils.printNodeCDATA(DOMUtils.java:286) at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:208) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at com.liferay.faces.util.context.PartialViewContextOnChangeImpl.processPartial(PartialViewContextOnChangeImpl.java:105) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:52) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:107) at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:133) at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178) The most relevant cases I could find are: http://jira.icesoft.org/browse/ICE-8379 http://jira.icesoft.org/browse/ICE-10282 Mircea made a tweak to the fix in ICE-8379 as part of ICE-9679 . The original fix in ICE-8379 was done to help with non-redirect navigation as that's what there example does. None of our samples use navigation so it easy for us to miss impacts in that area.
        Hide
        Deryk Sinotte added a comment -

        Clicking the button leads to the following exception:

        19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[ICEfacesSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.BridgeSetup$1]
        19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[JavaScriptRunnerSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.JavaScriptRunnerSetup$1]
        19:18:26,449 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[null] library=[null] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.util.CachingHeadersSetup$1]
        java.lang.NullPointerException
        	at org.icefaces.impl.util.DOMUtils.printNode(DOMUtils.java:298)
        	at org.icefaces.impl.util.DOMUtils.printNodeCDATA(DOMUtils.java:286)
        	at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:208)
        	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
        	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
        	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
        	at com.liferay.faces.util.context.PartialViewContextOnChangeImpl.processPartial(PartialViewContextOnChangeImpl.java:105)
        	at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004)
        	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
        	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430)
        	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
        	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
        	at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:52)
        	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
        	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
        	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
        	at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:107)
        	at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:133)
        	at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178)

        The most relevant cases I could find are:

        ICE-8379
        ICE-10282

        A fix was made to the relevant code of ICE-8379 as part of ICE-9679. The original fix in ICE-8379 was done to help with non-redirect navigation as that's what there example does. None of our samples use navigation so it's conceivable that we didn't see the impact of this change.

        Show
        Deryk Sinotte added a comment - Clicking the button leads to the following exception: 19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[ICEfacesSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.BridgeSetup$1] 19:18:26,448 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[JavaScriptRunnerSetup.js] library=[ice.core] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.impl.event.JavaScriptRunnerSetup$1] 19:18:26,449 DEBUG [BodyRendererBridgeImpl:168] Rendering resource just before closing liferay-faces-bridge-body </div> name=[null] library=[null] rendererType=[javax.faces.Text] value=[null] className=[org.icefaces.util.CachingHeadersSetup$1] java.lang.NullPointerException at org.icefaces.impl.util.DOMUtils.printNode(DOMUtils.java:298) at org.icefaces.impl.util.DOMUtils.printNodeCDATA(DOMUtils.java:286) at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:208) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at com.liferay.faces.util.context.PartialViewContextOnChangeImpl.processPartial(PartialViewContextOnChangeImpl.java:105) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:52) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:107) at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:133) at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178) The most relevant cases I could find are: ICE-8379 ICE-10282 A fix was made to the relevant code of ICE-8379 as part of ICE-9679 . The original fix in ICE-8379 was done to help with non-redirect navigation as that's what there example does. None of our samples use navigation so it's conceivable that we didn't see the impact of this change.
        Hide
        Deryk Sinotte added a comment - - edited

        I'm attaching a modified version of the liferay-faces source tree. The poms have been changed so that when you build the iceface3-portlet it will use JSF 2.2, Liferay Faces Bridge 4.2-m2, and ICEfaces 4.0.

        1. Download and extract the zip.
        2. Navigate to demos/bridge/icefaces3-portlet.
        3. Build using "mvn clean package".
        4. Then deploy "cp target/icefaces3-portlet-4.2.0-m2.war ~/apps/liferay-portal-6.2-ce-ga2/deploy/" or wherever you Liferay installation is.
        Show
        Deryk Sinotte added a comment - - edited I'm attaching a modified version of the liferay-faces source tree. The poms have been changed so that when you build the iceface3-portlet it will use JSF 2.2, Liferay Faces Bridge 4.2-m2, and ICEfaces 4.0. Download and extract the zip. Navigate to demos/bridge/icefaces3-portlet. Build using "mvn clean package". Then deploy "cp target/icefaces3-portlet-4.2.0-m2.war ~/apps/liferay-portal-6.2-ce-ga2/deploy/" or wherever you Liferay installation is.
        Hide
        Mircea Toma added a comment -

        Modified DOMPartialViewContext to generate custom head update only when there is a 'head' element to be found in the document.

        Show
        Mircea Toma added a comment - Modified DOMPartialViewContext to generate custom head update only when there is a 'head' element to be found in the document.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: