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

テーマが壊れ、ログにNPEが表示される

written-by

Laura Li

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

問題

  • 存在しないページにアクセスするとテーマが壊れる。 ログにもNPEがスローされる。
  • 再生産ステップ:

    存在しないページにアクセスする
    http://localhost:8080/web/guest/p/
    あるいは「xyz」という名前のコマース・サイトを作り、存在しないページにアクセスする
    http://localhost:8080/group/xyz/p/

    結果:テーマはいくつかのJSエラーで壊れています。 ログにNPEがスローされる。
    2023-02-28 02:19:46.382 ERROR [http-nio-8080-exec-6][IncludeTag:128] Current URL /group/xyz/p/ujoint123 generates exception: null
    java.lang.NullPointerException
    	at com.liferay.portal.util.PortalImpl._getAlternateURLs(PortalImpl.java:8293)
    	at com.liferay.portal.util.PortalImpl.getAlternateURLs(PortalImpl.java:1228)
    	at com.liferay.portal.kernel.util.PortalUtil.getAlternateURLs(PortalUtil.java:376)
    	at org.apache.jsp.html.common.themes.top_005fhead_jsp._jspService(top_005fhead_jsp.java:1237)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
    	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
    	at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
    	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
    	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    	at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:407)
    	at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:383)
    	at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:217)
    	at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:88)
    	at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:402)
    	at freemarker.ext.jsp.TagTransformModel$TagWriter.afterBody(TagTransformModel.java:390)
    	at freemarker.core.Environment.visitAndTransform(Environment.java:497)
    	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:103)
    	at freemarker.core.Environment.visit(Environment.java:331)
    	at freemarker.core.Environment.visit(Environment.java:337)
    

Environment

  • Liferay DXP 7.3

解決策

  • 修正プログラム LPS-177132 はこの問題を解決します。 この修正を含むHotfixをリクエストするか、7.3 Update 69をインストールしてください。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base