legacy-knowledge-base
公開されました Jul. 2, 2025

新しいフィックスパックをインストールした後の com.liferay.frontend.theme.contributor.extender の ClassCastException

written-by

Alfonso Crisci

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

問題

  • 新しいフィックスパックを使用して環境にパッチを適用した後、サーバーの起動時に次のエラーが発生する場合があります。
     ERROR [ServerService Thread Pool -- 68][ThemeContributorTopHeadDynamicInclude:93] bundle com.liferay.frontend.theme.contributor.extender:4.0.8 (504)[com.liferay.frontend.theme.contributor.extender.internal.servlet.taglib.ThemeContributorTopHeadDynamicInclude(1581)] : The addBundleWebResources method has thrown an exception 
    java.lang.ClassCastException: com.liferay.frontend.theme.contributor.extender.internal.BundleWebResourcesImpl cannot be cast to com.liferay.frontend.theme.contributor.extender.BundleWebResources
    at com.liferay.frontend.theme.contributor.extender.internal.servlet.taglib.ThemeContributorTopHeadDynamicInclude._rebuild(ThemeContributorTopHeadDynamicInclude.java:157)
    at com.liferay.frontend.theme.contributor.extender.internal.servlet.taglib.ThemeContributorTopHeadDynamicInclude.addBundleWebResources(ThemeContributorTopHeadDynamicInclude.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [...]

Environment

  • Liferay DXP 7.0+

解決策

  1. クリーンでカスタマイズされていない Liferay DXP バンドル ( カスタマー ポータルダウンロード ページからダウンロードできます) を用意し、影響を受ける Liferay 環境に存在するのと同じパッチ レベルでパッチを適用します。
  2. 影響を受けるサーバーが停止していることを確認します
  3. ここで、 $LIFERAY_HOME/osgi/marketplace/Liferay Foundation - Liferay Frontend Theme - Impl.lpkg を手順 1) のバニラ バンドルに新しくパッチを適用し、バンドルの対応する場所にコピー/置換します: $LIFERAY_HOME/osgi/ marketplace/Liferay Foundation - Liferay フロントエンド テーマ - Impl.lpkg
  4. $ LIFERAY_HOME/osgi/state $ LIFERAY_HOME/work $ TOMCAT_HOME/work /temp のコンテンツをクリーンアップします>>
  5. サーバーを起動すると、エラーが表示されなくなります

追加情報

  • 根本的な原因は、 /osgi/marketplace/Liferay Foundation - Liferay Frontend Theme - Impl.lpkgcom.liferay.frontend.theme.contributor.extender-4.0.8.jarcom.liferay の両方が含まれていることです。 frontend.theme.contributor.extender-4.0.12.jar、これはおそらく破損したパッチ操作の結果です。
did-this-article-resolve-your-issue

legacy-knowledge-base