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.
The migration of the Chat portlet is complete.