Legacy Knowledge Base
Published Sep. 10, 2025

NullPointerException and blank page after redeploying JSP fragment module

Written By

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • We start with a state where we have a jsp fragment deployed and is working fine. 
    We then make a change to that module and do a hot deployment. 
    After that, the page on which the fragment is being used shows only the portlet title and no portlet body. The logs show NullPointerException exception. That goes away when the server is restarted. 
  • Stack trace could look something like this:
[15.05.2019 10:05:54,772 +0300] ERROR [http-nio-443-exec-10][IncludeTag:128] Current URL ... generates exception: null 
java.lang.NullPointerException
at com.liferay.taglib.servlet.PageContextWrapper.handlePageException(PageContextWrapper.java:173)
at org.apache.jsp.journal_005fresources_jsp._jspService(journal_005fresources_jsp:478)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:372)
at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:349)
at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:202)
at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:86)
at org.apache.jsp.configuration_jsp._jspService(configuration_jsp:471)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:417)
at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:428)

Environment

  • Liferay DXP 7.0
  • Liferay DXP 7.1

Resolution

  • You probably have the property direct.servlet.context.reload set to false (and you are probably working in a developing, non-prod environment, doing frequent redeployments of JSP fragment modules)
  • Set the property to true.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base