When deleting deactivated users from UI or through API, NoSuchGroupException is thrown as follows.
Example 1
com.liferay.portal.NoSuchGroupException
No Group exists with the key {companyId=10155, classNameId=10191, classPK=48798001}
Example 2
com.liferay.portal.NoSuchGroupException
No Group exists with the key {companyId=20155, classNameId=20191, classPK=1822201
Resolution
The above example exceptions occur when modifications are made to User_.userId
when defaultuser=1
. Liferay default users should have a userId
of 20159 (after SP10) or 10159 (prior to SP10). If the userid
are set to the incorrect value, follow the steps below:
- Backup the database
- Manually update
User_.userId
to 10159 (or 20159) fordefaultuser=1
- Manually update
Contact_.userId
to 10159 (or 20159) foremailAddress
"default@xxx.xxx" - Navigate to Control Panel > Server Administration, and execute Clear the database cache.