Upgrading from Fix Pack 1 to Fix Pack 2 in Liferay DXP 7.3, a NoSuchGroupException occurs

Issue

  • When upgrading from Fix Pack 1 to Fix Pack 2, issues with the control panel options arise, such as being unable to use the page building option and having no portlets visible on the home page.
  • The console errors seen during server startup are listed below.
    • ERROR [main][UpgradeStepRegistratorTracker:144] Failed upgrade process for module com.liferay.layout.service
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 344360
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109)

Environment

  • Liferay DXP 7.3 SP1 

Resolution

  • These errors are common in the situation of orphaned data, thus, the preceding issue occurs because the group id entry is present in the layout table but not in the group table with the same group id.
  • Hence, try to locate this layout on the UI and delete it to check if the issue still persists?
    • Another possible approach would be to remove the orphaned Layout with the attached Groovy script. In order to do so, please run the attached script by navigating to the Control Panel → Server Administration, then click on Script and choose Groovy.

       

Additional Information

  • We have a channel named "Global Service Team" that assists with this kind of script or code development. 
  • Please note:
    • Since this resolution requires modification of database entries using Liferay API, ensure that a database backup is created beforehand and continue to maintain adequate backups in case a rollback is required.
    • We highly recommend testing the above-suggested approach in a lower environment and then move it to production as per your discretion if you feel comfortable with it.
  • Attached groovy script which was used in this use case
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助