Upgrade Failed due to the Error "No User exists with the primary key..."
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
- When doing the database upgrade from 7.2 DXP-20 to Liferay DXP 7.4 QR 2024.Q3.0, the upgrade can fail with the following error:
ERROR [main][UpgradeExecutor:333] Failed upgrade process for module com.liferay.layout.page.template.service
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=XXXXXXX,type=0}
Environment
- Liferay DXP 7.4 QR 2024.Q3.0
- Liferay DXP 7.2
Resolution
- This error indicates that the guest user for the company with the stated companyId has been somehow deleted from the database, prior to the upgrade
- To resolve this issue, the guest user can be re-created for the specified companyId in the pre-upgrade environment, and then the upgrade can be run successfully, with that error resolved.
Did this article resolve your issue ?