ORA-00001 WARN: unique constraint

Issue

  • When upgrading from DXP 7.2 to 7.4 U53 using an Oracle database, we faced the following WARN message:
    ORA-00001: unique constraint (PORTALESLIFERAY1.IX_CB778855,  nos podeis decir a que se debe y si afecta al proceso de acutalización del producto.

    com.liferay.portal.kernel.log.LogSanitizerException: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (PORTALESLIFERAY1.IX_CB778855) violated_ [Sanitized]

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) ~[ojdbc8.jar:18.3.0.0.0]

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446) ~[ojdbc8.jar:18.3.0.0.0]

        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1052) ~[ojdbc8.jar:18.3.0.0.0]

        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:537) ~[ojdbc8.jar:18.3.0.0.0]

        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:255) ~[ojdbc8.jar:18.3.0.0.0]

        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:610) ~[ojdbc8.jar:18.3.0.0.0]

Environment

  • DXP 7.4

Resolution

  • At the WARN level, the following exception appears but you can ignore it:
    2023-02-09 09:46:46.396 WARN  [main][BasePortletIdUpgradeProcess:511] null
    com.liferay.portal.kernel.log.LogSanitizerException: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (PORTALESLIFERAY1.IX_CB778855) violated_ [Sanitized]
    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) ~[ojdbc8.jar:18.3.0.0.0]
    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446) ~[ojdbc8.jar:18.3.0.0.0]

    [...]

    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
    at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:54) [com.liferay.portal.tools.db.upgrade.client.jar:?]
    Caused by: com.liferay.portal.kernel.log.LogSanitizerException: Error : 1, Position : 0, Sql = update PortletPreferences set portletId = 'com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormAdminPortlet' where portletId = 'com_liferay_polls_web_portlet_PollsPortlet', OriginalSql = update PortletPreferences set portletId = 'com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormAdminPortlet' where portletId = 'com_liferay_polls_web_portlet_PollsPortlet', Error Msg = ORA-00001: unique constraint (PORTALESLIFERAY1.IX_CB778855) violated_ [Sanitized]
    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498) ~[ojdbc8.jar:18.3.0.0.0]
    ... 284 more
    There is no problem in ignoring it, once the warning is caused by trying to insert the same record twice.

    The second record is inserted because in DXP 7.4 the Polls functionality has been migrated to Foms, so in the DXP 7.4 upgrade that is a process that updates the portletId in the portletPreferences table changing from com_liferay_polls_web_portlet_PollsPortlet to com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormAdminPortlet,but for the dashboard portlet plid=0, a duplicate insert attempt occurs.

    For more information, you can see this article  Asset Libraries throw warnings after upgrade from DXP 7.3 where all this is explained and has a workaround that prevents the WARN from appearing during the upgrade, although as mentioned before, the WARN appears on said index IX_CB778855 would not affect the upgrade.

Additional Information

Constraint (IX_228562AD) violated when LDAP import on startup is on

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