ICEpush
  1. ICEpush
  2. PUSH-311

Push not working with portlets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      Portlet
    • Assignee Priority:
      P1

      Description

      Push doesn't seem to be working properly in portlets. When I initially load up the chat portlet, I'll get the following exception almost right away:

      Exception in thread "Timer-2" java.lang.NullPointerException
      at com.liferay.faces.bridge.container.PortletContainerImpl.getRequestParameter(PortletContainerImpl.java:528)
      at com.liferay.faces.bridge.context.map.RequestParameterMapImpl.getProperty(RequestParameterMapImpl.java:107)
      at com.liferay.faces.bridge.context.map.RequestParameterMapImpl.getProperty(RequestParameterMapImpl.java:37)
      at com.liferay.faces.util.map.AbstractPropertyMap.get(AbstractPropertyMap.java:106)
      at org.icefaces.impl.push.servlet.ProxyHttpServletRequest.getParameter(ProxyHttpServletRequest.java:169)
      at org.icepush.servlet.ServletRequest.checkExistenceOf(ServletRequest.java:260)
      at org.icepush.servlet.ServletRequest.getParameter(ServletRequest.java:150)
      at org.icepush.servlet.ServletRequest.getParameterAsLong(ServletRequest.java:189)
      at org.icepush.servlet.ServletPushRequest.getHeartbeatInterval(ServletPushRequest.java:53)
      at org.icepush.servlet.ServletPushRequestResponse.getHeartbeatInterval(ServletPushRequestResponse.java:62)
      at org.icepush.http.standard.PushRequestProxy.getHeartbeatInterval(PushRequestProxy.java:45)
      at org.icepush.BlockingConnectionServer.resetTimeout(BlockingConnectionServer.java:247)
      at org.icepush.BlockingConnectionServer.sendNotifications(BlockingConnectionServer.java:179)
      at org.icepush.BlockingConnectionServer.receive(BlockingConnectionServer.java:292)
      at org.icepush.LocalNotificationBroadcaster$BroadcastTask.run(LocalNotificationBroadcaster.java:77)
      at java.util.TimerThread.mainLoop(Timer.java:555)
      at java.util.TimerThread.run(Timer.java:505)

      After that, chat is operational but the updates only occur during heartbeats, not when a message is sent. The exception only occurs the first time the page is rendered. If I switch to a different portlet page (like the Welcome page with no ICEfaces portlets) and then switch back, I don't see the exception but push still has the same behaviour where updates only occur during heartbeats.

      I logged the various parameters that were being requested to see if there was something obvious. Perhaps the view and/or simulator parameters are important clues:

      ProxyHttpServletRequest.getParameter: view : null
      ProxyHttpServletRequest.getParameter: simulator : null
      ProxyHttpServletRequest.getParameter: view : null
      ProxyHttpServletRequest.getParameter: simulator : null
      ProxyHttpServletRequest.getParameter: ice.push.browser : 2fuhtai5tun
      ProxyHttpServletRequest.getParameter: ice.push.browser : 2fuhtai5tun
      ProxyHttpServletRequest.getParameter: ice.sendConfiguration : null
      ProxyHttpServletRequest.getParameter: ice.pushid : v24ua682
      ProxyHttpServletRequest.getParameter: ice.push.heartbeat : 15000
      ProxyHttpServletRequest.getParameter: ice.push.heartbeat : 15000
      ProxyHttpServletRequest.getParameter: ice.pushid : v24ua682

      I've also seen this occasionally but it's not consistent and is could be app related or related to the issue above.

      Caused by: java.lang.RuntimeException: FacesContext is not present for thread Thread[http-bio-8080-exec-20,5,main]
      at org.icefaces.application.PushRenderer.missingFacesContext(PushRenderer.java:284)
      at org.icefaces.application.PushRenderer.render(PushRenderer.java:193)
      at org.icefaces.sample.portlet.chat.ChatRoom.addMessage(ChatRoom.java:90)
      at org.icefaces.sample.portlet.chat.ChatRoom.removeParticipant(ChatRoom.java:64)
      at org.icefaces.sample.portlet.chat.Participant.logout(Participant.java:130)
          

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #40527 Wed Apr 02 11:33:30 MDT 2014 deryk.sinotte PUSH-311: tweak chat-portlet for better logout behaviour during session expiry; extend ProxySession and improve error handling/logging
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxySession.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/core/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/core/chat/src/main/java/org/icefaces/sample/portlet/chat/Participant.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #40507 Tue Apr 01 13:16:43 MDT 2014 jack.van.ooststroom Fixed JIRA PUSH-311 : Push not working with portlets
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalNotificationBroadcaster.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/servlet/ServletPushRequest.java

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: