Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: 2.0-Beta2, 2.0.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2 portlet
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      To test and demonstrate best practices for developing portlets using the new PortletFaces bridge, we need to upgrade our existing chat sample application.

        Issue Links

          Activity

          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Ken Fyten made changes -
          Fix Version/s 2.0.0 [ 10230 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22632 Thu Oct 14 15:13:47 MDT 2010 deryk.sinotte ICE-6018: adjust markup to use html tag instead of f:view
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/chat.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22590 Tue Oct 12 09:04:10 MDT 2010 deryk.sinotte ICE-6018: adjust Liferay configuration files so that categories work properly
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-display.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-plugin-package.properties
          Commit graph MODIFY /icefaces2/trunk/icefaces/compat/samples/component-showcase/portlets/web/WEB-INF/liferay-display.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/portlet.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/web.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-portlet.xml
          Deryk Sinotte made changes -
          Salesforce Case []
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial]
          Deryk Sinotte made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Deryk Sinotte made changes -
          Link This issue depends on ICE-6022 [ ICE-6022 ]
          Hide
          Deryk Sinotte added a comment -

          The migration of the Chat portlet is complete.

          Show
          Deryk Sinotte added a comment - The migration of the Chat portlet is complete.
          Deryk Sinotte made changes -
          Salesforce Case []
          Fix Version/s 2.0-Beta2 [ 10242 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22341 Tue Sep 14 13:33:51 MDT 2010 deryk.sinotte ICE-6018: tweak common portlet build file for naming created .war files
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/common.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22338 Tue Sep 14 11:32:49 MDT 2010 deryk.sinotte ICE-6018: adjusting portlet name to avoid conflict with Liferay chat portlet and adding default namespace to markup
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/portlet.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/chat.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22288 Wed Sep 08 11:04:49 MDT 2010 deryk.sinotte ICE-6018: Minor tweaks to portlet name, cleanup System.out
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-display.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-portlet.xml
          Hide
          Deryk Sinotte added a comment -

          As for issue #1, it seems simple enough to replicate.

          1) Add two instances of the chat portlet to one page
          2) Login to the first one and chat.
          3) Login to the second one and chat.
          4) Go back to the first one and try to chat.

          The partial update that comes back is a ViewRoot update but is rooted on the div containing the portlet. Since it's a ViewRoot style update, the entire page is replaced rather than just the parent div of the portlet.

          ?xml version='1.0' encoding='UTF-8'?>
          <partial-response><changes><update id="javax.faces.ViewRoot"><![CDATA[<div class="portletfaces-bridge-body">

          Show
          Deryk Sinotte added a comment - As for issue #1, it seems simple enough to replicate. 1) Add two instances of the chat portlet to one page 2) Login to the first one and chat. 3) Login to the second one and chat. 4) Go back to the first one and try to chat. The partial update that comes back is a ViewRoot update but is rooted on the div containing the portlet. Since it's a ViewRoot style update, the entire page is replaced rather than just the parent div of the portlet. ?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="javax.faces.ViewRoot"><![CDATA[<div class="portletfaces-bridge-body">
          Hide
          Deryk Sinotte added a comment -

          So for issue #2 noted above, there always seems to be an INFO level message posted just before the NPE:

          22:40:17,741 INFO [PortalImpl:3812] Current URL /web/guest/chat?_chat_WAR_ice2portlet_INSTANCE_aqI2_javax.faces.resource=listen.icepush&p_p_cacheability=cacheLevelPage&p_p_col_count=2&p_p_col_id=column-1&p_p_id=chat_WAR_ice2portlet_INSTANCE_aqI2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal generates exception: null
          22:40:17,761 ERROR [jsp:?] java.lang.NullPointerException
          java.lang.NullPointerException
          at javax.faces.context.FacesContext.setCurrentInstance(FacesContext.java:770)
          at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:562)
          at org.portletfaces.bridge.BridgeImpl.cleanupFacesContext(BridgeImpl.java:325)
          at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:295)
          at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:173)
          at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119)
          at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
          at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

          The NPE itself occurs in the FacesContext.setCurrentInstance method:

          protected static void setCurrentInstance(FacesContext context) {

          if (context == null)

          { instance.remove(); }

          else

          { instance.set(context); }

          }

          where if the FacesContext is null, it tries to call remove on the ThreadLocal (instance) but that instance is null. Since it's likely a Push request, perhaps the bridge needs to have more info before tyring to release the current FacesContext reference.

          Show
          Deryk Sinotte added a comment - So for issue #2 noted above, there always seems to be an INFO level message posted just before the NPE: 22:40:17,741 INFO [PortalImpl:3812] Current URL /web/guest/chat?_chat_WAR_ice2portlet_INSTANCE_aqI2_javax.faces.resource=listen.icepush&p_p_cacheability=cacheLevelPage&p_p_col_count=2&p_p_col_id=column-1&p_p_id=chat_WAR_ice2portlet_INSTANCE_aqI2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal generates exception: null 22:40:17,761 ERROR [jsp:?] java.lang.NullPointerException java.lang.NullPointerException at javax.faces.context.FacesContext.setCurrentInstance(FacesContext.java:770) at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:562) at org.portletfaces.bridge.BridgeImpl.cleanupFacesContext(BridgeImpl.java:325) at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:295) at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:173) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) The NPE itself occurs in the FacesContext.setCurrentInstance method: protected static void setCurrentInstance(FacesContext context) { if (context == null) { instance.remove(); } else { instance.set(context); } } where if the FacesContext is null, it tries to call remove on the ThreadLocal (instance) but that instance is null. Since it's likely a Push request, perhaps the bridge needs to have more info before tyring to release the current FacesContext reference.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22255 Mon Aug 30 15:28:33 MDT 2010 deryk.sinotte ICE-6018: fixed some logic in the message display to handle moving through the messages
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/Participant.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/chat.xhtml
          Hide
          Deryk Sinotte added a comment -

          The chat portlet example is checked in and working with push in some fashion but there are still some issues. Ones that I know of are:

          1) When sending a chat message, the portlet will sometimes "blow up" so that it's in it's own page. This is rare when there is only a single instance on the page but becomes easier to recreate the more instances that are added. Still looking at this.

          2) It appears that Push requests are occasionally leading to:

          java.lang.NullPointerException
          at javax.faces.context.FacesContext.setCurrentInstance(FacesContext.java:770)
          at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:562)
          at org.portletfaces.bridge.BridgeImpl.cleanupFacesContext(BridgeImpl.java:325)
          at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:295)
          at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:173)
          at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119)
          at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
          at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

          Show
          Deryk Sinotte added a comment - The chat portlet example is checked in and working with push in some fashion but there are still some issues. Ones that I know of are: 1) When sending a chat message, the portlet will sometimes "blow up" so that it's in it's own page. This is rare when there is only a single instance on the page but becomes easier to recreate the more instances that are added. Still looking at this. 2) It appears that Push requests are occasionally leading to: java.lang.NullPointerException at javax.faces.context.FacesContext.setCurrentInstance(FacesContext.java:770) at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:562) at org.portletfaces.bridge.BridgeImpl.cleanupFacesContext(BridgeImpl.java:325) at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:295) at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:173) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22250 Mon Aug 30 13:23:01 MDT 2010 deryk.sinotte ICE-6018: fixed locale resource messages
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/Participant.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/chat.xhtml
          Deryk Sinotte made changes -
          Field Original Value New Value
          Salesforce Case []
          Assignee Priority P1
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Deryk Sinotte created issue -
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22249 Mon Aug 30 11:17:03 MDT 2010 deryk.sinotte ICE-6018: fixed locale resource messages
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/Participant.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/chat.xhtml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat/resources/messages.properties
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/faces-config.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/resources/ResourceUtil.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22248 Mon Aug 30 10:46:31 MDT 2010 deryk.sinotte ICE-6018: changes to better support building portlet examples
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/build/common.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22247 Mon Aug 30 10:38:31 MDT 2010 deryk.sinotte ICE-6018: changes to better support building portlet examples
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/build/common.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22246 Mon Aug 30 10:35:04 MDT 2010 deryk.sinotte ICE-6018: initial checkin of modified chat portlet example
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/css
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/images/up-arrow.png
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/common.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/Participant.java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/web.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat/resources/messages.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-display.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/images/spacer.png
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-plugin-package.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/chat.xhtml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/liferay-portlet.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/resources/ResourceUtil.java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/images
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/images/down-arrow.png
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/portlet.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF/faces-config.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/Message.java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat/resources/messages_en_US.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat/resources/messages_es.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/css/chat.css
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat/resources/messages_en.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/resources/org/icefaces/sample/portlet/chat/resources
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/webapp/WEB-INF
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets
          Commit graph ADD /icefaces2/trunk/icefaces/samples/portlets/chat/src/main/java/org/icefaces/sample/portlet/chat/resources

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: