legacy-knowledge-base
公開されました Sep. 10, 2025

JSP は osgi モジュールが再起動され、direct.servlet.context.reload プロパティが false に設定されている場合に動作を停止します。

written-by

Jorge Diaz

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

learn-legacy-article-disclaimer-text

問題

  • JSP は osgi モジュールが再起動され、 direct.servlet.context.reload=false の設定でダイレクトサーブレットのコンテキストリロード機能が無効になっている場合に動作を停止します。
  • 問題はケースにも再現されています。
    • 実行中のLiferay環境に、既存のJSPモジュールを上書きする新しいosgiフラグメントモジュールを配置します ( JSP Overrides Using-OSGi Fragmentsを参照)。
    • 実行中のLiferay環境にJSPを含む既存のモジュールの新しいバージョンをデプロイします。
  • この問題により、以下のような例外が発生することもあります。
    2018-01-29 05:30:59.053 ERROR [http-nio-8080-exec-7][IncludeTag:128] Current URL /group/control_panel/manage?p_p_id=com_liferay_server_admin_web_portlet_ServerAdminPortlet&p_p_lifecycle=0&p_p_state=maximized generates exception: null
    java.lang.NullPointerException
    	at com.liferay.taglib.servlet.PageContextWrapper.handlePageException(PageContextWrapper.java:173)
    	at org.apache.jsp.server_jsp._jspService(server_jsp:653)
    	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.view_jsp._jspService(view_jsp:432)

環境への配慮

  • DXP7.
  • DXP 7.1
  • DXP7.
  • DXP7.

決議

  • direct.servlet.context.reload=false でダイレクトサーブレットのコンテキストリロード機能を無効にすることは、実行時に JSP の動的リロード機能に依存する機能とは互換性がありません。
  • これを無効にした場合、実行時にJSPを動的にリロードするような管理操作を行うと、そのJSPは動作を停止してしまいます。
  • これらの操作の一部を紹介します。
    • JSPファイルを含むモジュールを手動で停止/開始します。
    • 既存のモジュールの新しいバージョンの osgi モジュールをデプロイします。
    • 他のモジュールの既存のJSPファイルを上書きするために、新しいosgiフラグメントをデプロイします。
  • この問題を回避するには、2つの方法があります。
    • JSPファイルを強制的にリロードするために、これらの操作を行った後は必ずアプリケーションサーバを再起動してください。
    • direct.servlet.context.reload=false プロパティを削除し、ダイレクトサーブレットのコンテキストリロード機能を有効にします。

追加情報

  • チケット LPS-77650 jsp,jspf ファイルで "<liferay-util:include" を使用しているモジュールを再起動すると、空白のページが表示されます。
did-this-article-resolve-your-issue

legacy-knowledge-base