<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>"No group exists with the key" when deleting user</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120063577" />
  <subtitle>"No group exists with the key" when deleting user</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120063577</id>
  <updated>2026-04-03T17:53:26Z</updated>
  <dc:date>2026-04-03T17:53:26Z</dc:date>
  <entry>
    <title>"No group exists with the key" when deleting user</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120063576" />
    <author>
      <name>Micael Ericsson</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120063576</id>
    <updated>2020-10-08T10:30:05Z</updated>
    <published>2020-10-08T10:30:05Z</published>
    <summary type="html">In our Liferay 6.2 portal, we have a cleaning hook that deletes old users. I recently found out that this has aborted for a while, leaving a large amount of old users in the system. When deleting user with id 41647466 the liferay.log says &amp;#34;NoSuchGroupException: No group exists with key: {companyId: 20155, className: 20191, classPK: 42392501}..&amp;#34;. I can resolve companyId and className and they are correct. classPK I guess is userId from Users- table and the default user, which exists. And there is nothing in Group_ table matching these data. When reading other similar posts and the above analyze my conclusion is that the default user has been deleted and with it the group. Then the default users have been created somehow but not the matching group. Correct analyze?What is the best solution to solve this? How to create a new group corresponding to the default user?</summary>
    <dc:creator>Micael Ericsson</dc:creator>
    <dc:date>2020-10-08T10:30:05Z</dc:date>
  </entry>
</feed>
