Legacy Knowledge Base
公開されました Sep. 10, 2025

エラー "No Group exists with primary key xxxxxx "のためアップグレードに失敗しました。

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

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.

問題

  • 7.0 de-98から7.4へのデータベースアップグレードを行ったところ、以下のエラーでアップグレードに失敗しました:
    ERROR [main][ReleaseManagerImpl:183] Failed upgrade process for module
    com.liferay.dynamic.data.mapping.service
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 3208897
        at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:136)b ~[portal-kernel.jar:?]
    ......

環境

  • Liferay DXP 7.0, Liferay DXP 7.3

解像度

  • このエラーは、DDMStructureテーブルの一部のデータが、Group_テーブルに存在するgroupIdを持っていないことを意味します。
  • 添付のGroovyスクリプトを使用して、孤児となったデータをクリーニングしてください。
  • ステップ:
    1. データベースをバックアップする
    2. コントロールパネル > 設定 > サーバー管理 > スクリプトに移動します。
    3. 添付のスクリプトの内容をコピーして、textareaに貼り付けます。
    4. スクリプトが正常に実行され、以下のようにログにメッセージが表示されるはずです:
      2023-04-21 00:51:21.778 INFO [http-nio-8080-exec-8][DeleteOrphanedDDMStructureLayouts:?]
      Deleting DDM structure layout 3210052 as its group id does not exist…

追加情報

  • Liferay DXP 7.0 de-98、Liferay DXP 7.3 SP3でスクリプトは正常に実行されます。 他のDXPのバージョンでも動作する可能性があります。 データベースのバックアップやスクリプトのテストは、お客様のご判断で行っていただいて結構です。

Did this article resolve your issue ?

Legacy Knowledge Base