java.sql.BatchUpdateException: Duplicate entry errors

Issue

  • Duplicate entry error when switching from Hypersonic to MySQL using the setup wizard
  • Steps to reproduce
    1) Start portal with hypersonic
    2) In Setup Wizard, add test@liferay.com as an email
    3) Click to change the default database
    4) Change database type to MySQL
    5) Change username to root (or local MySQL username)
    6) Add MySQL password
    7) Click finish configuration
    8) Restart portal
    Expected Behavior: Portal is connected to MySQL without errors
    Observed Behavior: The following error appears in the console
    LIFERAY_ERROR: HHH000315: Exception executing batch [java.sql.BatchUpdateException: Duplicate entry '43802-0-com.liferay.site.util_recentGroups-com.liferay.portal.ke' for key 'IX_A6DD0ECF'], SQL: insert into PortalPreferenceValue (mvccVersion, companyId, portalPreferencesId, index_, key_, largeValue, namespace, smallValue, portalPreferenceValueId) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
    [exec] LIFERAY_ERROR: Duplicate entry '43802-0-com.liferay.site.util_recentGroups-com.liferay.portal.ke' for key 'IX_A6DD0ECF'

Environment

  • Liferay DXP 7.4

Resolution

  • The observed behavior is a known regression bug which is being addressed here: LPS-180393

Additional Information

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助