Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
unspecified
-
None
Description
Adding a hot deployed portlet to a page using the Page Administrator Portlet results in a NullPointerException which points to line 161 PortletModeAnchorTag.java (see stack trace below). The hot deployment was done using the Tomcat manager application.
The proximal cause of this problem is a null PortletWindowConfig object. However, if a portlet-app record for this portlet is added to pluto-portal-driver-config.xml, and Pluto is restarted, the portlet can be sucessfully added to a portal page using the Page Administrator.
Althought null checks can fix the problem in the PortletModeAnchorTag class, the root problem is that we need to notify users of this problem and its solution. I have found this NPE also occurs if there are errors in manually updating the config file or if I forgot to update that file after manually deploying a new portlet.
TOMCAT ERROR PAGE OUTPUT:
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/themes/pluto-default-theme.jsp:109
106: <c:forEach var="portlet" varStatus="status"
107: items="${currentPage.portletIds}" begin="1" step="2">
108: <c:set var="portlet" value="${portlet}" scope="request"/>
109: <jsp:include page="portlet-skin.jsp"/>
110: </c:forEach>
111: </div>
112:
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:148)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/themes/portlet-skin.jsp:26
23: <div class="portlet" id='<c:out value="${portlet}"/>'>
24: <div class="header">
25: <!-- Portlet Mode Controls -->
26: <pluto:modeAnchor portletMode="view"/>
27: <pluto:modeAnchor portletMode="edit"/>
28: <pluto:modeAnchor portletMode="help"/>
29: <!-- Window State Controls -->
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspx_meth_c_forEach_3(pluto_002ddefault_002dtheme_jsp.java:814)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspx_meth_c_otherwise_1(pluto_002ddefault_002dtheme_jsp.java:702)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspx_meth_c_choose_1(pluto_002ddefault_002dtheme_jsp.java:562)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspService(pluto_002ddefault_002dtheme_jsp.java:159)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:148)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
org.apache.pluto.driver.tags.PortletModeAnchorTag.isPortletModeAllowed(PortletModeAnchorTag.java:161)
org.apache.pluto.driver.tags.PortletModeAnchorTag.doStartTag(PortletModeAnchorTag.java:89)
org.apache.jsp.WEB_002dINF.themes.portlet_002dskin_jsp._jspx_meth_pluto_modeAnchor_0(portlet_002dskin_jsp.java:178)
org.apache.jsp.WEB_002dINF.themes.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(portlet_002dskin_jsp.java:115)
org.apache.jsp.WEB_002dINF.themes.portlet_002dskin_jsp._jspService(portlet_002dskin_jsp.java:73)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspx_meth_c_forEach_3(pluto_002ddefault_002dtheme_jsp.java:814)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspx_meth_c_otherwise_1(pluto_002ddefault_002dtheme_jsp.java:702)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspx_meth_c_choose_1(pluto_002ddefault_002dtheme_jsp.java:562)
org.apache.jsp.WEB_002dINF.themes.pluto_002ddefault_002dtheme_jsp._jspService(pluto_002ddefault_002dtheme_jsp.java:159)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:148)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)