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

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.

 

Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0