Legacy Knowledge Base
Published Jun. 30, 2025

No Group exists with the primary "xxxxx" key shown in the logs

Written By

Giulianna Munoa

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.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • The following messages are identified in the logs:
Jun 07 01:20:15.120 build-43 liferay[liferay-ldbgc] com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 377736

Jun 07 07:13:56.783 build-43 liferay[liferay-ldbgc] com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 377785

Environment

  • Liferay DXP 7.2+
  • Liferay PaaS

Resolution

  • Sometimes this is caused by orphan layout records left in the database so in order to clean them you can execute the attached groovy script 
  • Follow this steps:
    1. Backup your database
    2. Execute the attached script to find out how many orphan records are found.
    3. To delete the orphan records modify the line 222, find the variable _safeMode and set it to _safeMode=false
    4. Executing the deletion might cause a warning message:
      Someone may be trying to circumvent the permission checker
    5. To verify if the orphan records were removed you can execute the script again with _safeMode=true 

 

Additional Information

  • Always execute this script in DEV environments first and after all test passed you can replicate on PRD.

 

Did this article resolve your issue ?

Legacy Knowledge Base