Legacy Knowledge Base
Published Sep. 10, 2025

Failed upgrade process com.liferay.dynamic.data.mapping.internal.upgrade.v4_0_0.DDMStructureUpgradeProcess

Written By

Dávid Hegedüs

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.

Issue

  • You might encounter an issue when upgrading from 7.2 to 7.4 where the upgrade step for module com.liferay.dynamic.data.mapping.service fails due to a NoSuchGroupException:
    2024-05-22 13:18:39.512 INFO [main][UpgradeProcess:137] Failed upgrade process com.liferay.dynamic.data.mapping.internal.upgrade.v4_0_0.DDMStructureUpgradeProcess in 5505 ms
    2024-05-22 13:18:39.521 ERROR [main][UpgradeExecutor:333] Failed upgrade process for module com.liferay.dynamic.data.mapping.service
    com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key XXXXXX
    at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:128) ~[portal-kernel.jar:?]
    at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor._executeUpgradeInfos(UpgradeExecutor.java:202) ~[?:?]
    at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:124) ~[?:?]
    at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:85) ~[?:?]
    ...
    Caused by: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key XXXXXX
    at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:14166) ~[portal-impl.jar:?]
    at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:14182) ~[portal-impl.jar:?]
    at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1695) ~[portal-impl.jar:?]
    at jdk.internal.reflect.GeneratedMethodAccessor222.invoke(Unknown Source) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    ...
  • The reason behind this is that you probably have some orphaned data in your DB which needs to be cleaned up

Environment

  • Liferay DXP 7.2
  • Liferay DXP 7.4+

Resolution

  • Run the attached groovy script to clean up the orphaned data
  • Make sure to modify the 14th row based on the comment above it, and the 22nd row based on your own groupids
Did this article resolve your issue ?

Legacy Knowledge Base