ICEpush
  1. ICEpush
  2. PUSH-247

NullPointerException when icepush.jar is present alongside icefaces.jar in ICEfaces portlets on Liferay + WebLogic

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA_P02
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      Liferay Portal 6.1.20 EE GA2 + ICEfaces 3.3 + WebLogic 10.3.6.0
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      This issue was first recorded in the Liferay Faces issue tracker here:
      http://issues.liferay.com/browse/FACES-1598

      The first time the icefaces3-portlet is loaded, it works OK. But when clicking away on a different page, and then visiting the page with the icefaces3-portlet again, the following exception occurs:

      {code}
      java.lang.NullPointerException
      at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
      at org.icepush.LocalPushGroupManager.addMember(LocalPushGroupManager.java:122)
      at org.icepush.PushContext.addGroupMember(PushContext.java:137)
      at org.icefaces.impl.push.SessionViewManager.addView(SessionViewManager.java:51)
      at org.icefaces.impl.event.BridgeSetup$2.encode(BridgeSetup.java:205)
      at org.icefaces.impl.event.UIOutputWriter.encodeBegin(UIOutputWriter.java:27)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)
      at com.liferay.faces.bridge.renderkit.html_basic.BodyRenderer.encodeEnd(BodyRenderer.java:144)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:35)
      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:139)
      at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:227)
      at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:85)
      at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112)
      at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
      at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:204)
      at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
      at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
      at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
      at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)
      at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447)
      at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:534)
      at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:607)
      at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:359)
      at jsp_servlet._html._portal.__render_portlet._jspService(__render_portlet.java:1252)
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)
      at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447)
      at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:53)
      at com.liferay.portal.servlet.PACLRequestDispatcherWrapper.doDispatch(PACLRequestDispatcherWrapper.java:90)
      at com.liferay.portal.servlet.PACLRequestDispatcherWrapper.include(PACLRequestDispatcherWrapper.java:54)
      at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:5158)
      at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1569)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:165)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:97)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.doProcessTemplate(RuntimePortletImpl.java:531)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.doDispatch(RuntimePortletImpl.java:394)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:228)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:216)
      at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:113)
      at jsp_servlet._html._portal._layout._view.__portlet._jspService(__portlet.java:522)
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)
      at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447)
      at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:468)
      at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:735)
      at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:249)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:560)
      at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:537)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
      at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:138)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:335)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:253)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:216)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
      {code}

      The workaround for the icefaces3-portlet is to exclude the icepush.jar dependency with a maven profile, since the portlet does not make use of Ajax Push functionality:

      {code}
      <profile>
      <id>weblogic</id>
      <dependencies>
      <dependency>
      <groupId>org.icefaces</groupId>
      <artifactId>icefaces</artifactId>
      <exclusions>
      <exclusion>
      <groupId>org.icepush</groupId>
      <artifactId>icepush</artifactId>
      </exclusion>
      </exclusions>
      </dependency>
      </dependencies>
      </profile>
      {code}

        Activity

        Hide
        Deryk Sinotte added a comment -

        The noted issued occurs within the LocalPushGroupManager.addMember() method:

        public void addMember(final String groupName, final String id) {
            PushID pushID = pushIDMap.get(id);
        

        The id being null causes the ConcurrentHashMap to throw the NPE. The id is assigned in a PhaseListener before the RestoreView phase:

            public static class AssignViewID implements PhaseListener {
                public void afterPhase(PhaseEvent event) {
                }
        
                //assign viewId as soon as possible
                public void beforePhase(PhaseEvent event) {
                    assignViewID(event.getFacesContext().getExternalContext());
                }
        
                public PhaseId getPhaseId() {
                    return PhaseId.RESTORE_VIEW;
                }
            }
        

        The technique simply adds a manufactured id to the request map:

            private static String assignViewID(ExternalContext externalContext) {
                final String viewIDParameter = externalContext.getRequestParameterMap().get("ice.view");
                //keep viewID sticky until page is unloaded
                BridgeSetup bridgeSetup = (BridgeSetup) externalContext.getApplicationMap().get(BRIDGE_SETUP);
                final String viewID = viewIDParameter == null ? bridgeSetup.generateViewID() : viewIDParameter;
                //save the calculated view state key so that other parts of the framework will use the same key
                externalContext.getRequestMap().put(ViewState, viewID);
                return viewID;
            }
        

        that can be used later on in the lifecycle.

        
            public static String getViewID(ExternalContext externalContext) {
                Map requestMap = externalContext.getRequestMap();
                return (String) requestMap.get(BridgeSetup.ViewState);
            }
        

        This is the parameter used by the SessionViewManager.addView() call as noted in the stack trace. Without that id, adding the view fails.

        So the issue is why is the id missing from the request map? Either it didn't get put in via the PhaseListener or it was lost from the request map somewhere along the way. Why it only happens with WebLogic is an additional bit of mystery.

        Show
        Deryk Sinotte added a comment - The noted issued occurs within the LocalPushGroupManager.addMember() method: public void addMember( final String groupName, final String id) { PushID pushID = pushIDMap.get(id); The id being null causes the ConcurrentHashMap to throw the NPE. The id is assigned in a PhaseListener before the RestoreView phase: public static class AssignViewID implements PhaseListener { public void afterPhase(PhaseEvent event) { } //assign viewId as soon as possible public void beforePhase(PhaseEvent event) { assignViewID(event.getFacesContext().getExternalContext()); } public PhaseId getPhaseId() { return PhaseId.RESTORE_VIEW; } } The technique simply adds a manufactured id to the request map: private static String assignViewID(ExternalContext externalContext) { final String viewIDParameter = externalContext.getRequestParameterMap().get( "ice.view" ); //keep viewID sticky until page is unloaded BridgeSetup bridgeSetup = (BridgeSetup) externalContext.getApplicationMap().get(BRIDGE_SETUP); final String viewID = viewIDParameter == null ? bridgeSetup.generateViewID() : viewIDParameter; //save the calculated view state key so that other parts of the framework will use the same key externalContext.getRequestMap().put(ViewState, viewID); return viewID; } that can be used later on in the lifecycle. public static String getViewID(ExternalContext externalContext) { Map requestMap = externalContext.getRequestMap(); return ( String ) requestMap.get(BridgeSetup.ViewState); } This is the parameter used by the SessionViewManager.addView() call as noted in the stack trace. Without that id, adding the view fails. So the issue is why is the id missing from the request map? Either it didn't get put in via the PhaseListener or it was lost from the request map somewhere along the way. Why it only happens with WebLogic is an additional bit of mystery.
        Hide
        Ken Fyten added a comment -

        Assign to Jack to try to reproduce using latest library versions and current EE P02 build.

        Liferay / WebLogic installation instructions are here: https://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-oracle-weblogic-103-0

        • Might as well keep this configured instance around for future reference as well. *
        Show
        Ken Fyten added a comment - Assign to Jack to try to reproduce using latest library versions and current EE P02 build. Liferay / WebLogic installation instructions are here: https://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-oracle-weblogic-103-0 Might as well keep this configured instance around for future reference as well. *
        Hide
        Neil Griffin added a comment -

        @Jack: Thanks for looking into this issue. I would recommend that you start with the Liferay Faces Wiki documentation. There are several "WebLogic" articles there.

        Show
        Neil Griffin added a comment - @Jack: Thanks for looking into this issue. I would recommend that you start with the Liferay Faces Wiki documentation. There are several "WebLogic" articles there.
        Hide
        Jack Van Ooststroom added a comment -

        With the help of Neil I spent quite some time trying to reproduce the issue.

        First I followed Liferay's documentation setting up a Liferay Portal on WebLogic Server environment. After encountering a couple of issues the environment seemed to be good to go.

        I took the Liferay Faces 3.1.4-ga5 bundle and made sure I was able to run Maven. I updated the pom.xml for the icefaces3-portlet sample to ensure icepush-3.3.0.jar was included in the final build. I changed the ListModelBean by adding a @PostConstruct setUp() method that invokes PushRenderer.addCurrentSession("job-application") and the applicant.xhtml to include <icecore:config render="true" /> to ensure the listen request is kicked off nicely.

        Deploying this with either the ICEfaces/ICEpush libraries from 3.3.0 or the upcoming EE 3.3.0.GA_P02 did not reproduce the NPE issue mentioned here. I do see the listen requests go nicely and I did browse away from this portlet and return, but no NPE.

        Basically, I haven't been able to reproduce this issue using the original ICEfaces 3.3 jars nor using the upcoming ICEfaces-EE 3.3.0.GA_P02 jars.

        Marking this one as Cannot Reproduce for now. If Neil can reproduce this again we can re-open this and try to address the issue.

        Show
        Jack Van Ooststroom added a comment - With the help of Neil I spent quite some time trying to reproduce the issue. First I followed Liferay's documentation setting up a Liferay Portal on WebLogic Server environment. After encountering a couple of issues the environment seemed to be good to go. I took the Liferay Faces 3.1.4-ga5 bundle and made sure I was able to run Maven. I updated the pom.xml for the icefaces3-portlet sample to ensure icepush-3.3.0.jar was included in the final build. I changed the ListModelBean by adding a @PostConstruct setUp() method that invokes PushRenderer.addCurrentSession("job-application") and the applicant.xhtml to include <icecore:config render="true" /> to ensure the listen request is kicked off nicely. Deploying this with either the ICEfaces/ICEpush libraries from 3.3.0 or the upcoming EE 3.3.0.GA_P02 did not reproduce the NPE issue mentioned here. I do see the listen requests go nicely and I did browse away from this portlet and return, but no NPE. Basically, I haven't been able to reproduce this issue using the original ICEfaces 3.3 jars nor using the upcoming ICEfaces-EE 3.3.0.GA_P02 jars. Marking this one as Cannot Reproduce for now. If Neil can reproduce this again we can re-open this and try to address the issue.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: