Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-89005

Constraint violation IX_8AB5CAE while importing large LAR files

    Details

      Description

      Reproduction steps:
      1. Set up a vanilla bundle
      2. Create a new Site
      3. Generate 1000 Web contents
      4. Export the web contents (steps 1-4 can be skipped if you have already a LAR file with 1000 articles. E.g.: test_1000_articles-20190114104051176.lar )
      5. Shut down the bundle, clean the DB
      6. Start a new vanilla bundle (from an empty DB)
      7. Import the LAR file

      Expected: import is successful (although, it takes along time)
      Actual: import fails at a random article, throwing either a DuplicateFriendlyURLEntryException or an SQL error about IX_8AB5CAE unique index violation

      When the web contents don't contain any special characters in their friendly URLs a DuplicateFriendlyURLEntryException is thrown:

      2019-01-14 14:43:02.379 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:173] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: {mvccVersion=0, friendlyURLEntryLocalizationId=6, companyId=20099, friendlyURLEntryId=37081, languageId=en_US, urlTitle=special-char-a-c5-90b, groupId=37052, classNameId=20501, classPK=37077}
      ...
      Caused by: com.liferay.friendly.url.exception.DuplicateFriendlyURLEntryException: {mvccVersion=0, friendlyURLEntryLocalizationId=6, companyId=20099, friendlyURLEntryId=37081, languageId=en_US, urlTitle=special-char-a-c5-90b, groupId=37052, classNameId=20501, classPK=37077}
      

      Otherwise (with special chars), the validation misses and the error is caught in the DB:

      Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (DB.IX_8AB5CAE) violated_ [Sanitized]
              at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:11190)
              at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:244)
              at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:125)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
              at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
              ... 97 more
      

      The difference in validation is caused by: LPS-89116

        Attachments

          Activity

            People

            Assignee:
            joyce.wang Joyce Wang
            Reporter:
            vendel.toreki Vendel Töreki
            Participants of an Issue:
            Recent user:
            Clarissa Velazquez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 32 weeks, 4 days ago

                Packages

                Version Package
                7.1.10 DXP FP10
                7.1.10.2 SP2
                7.1.3 CE GA4
                7.1.X
                Master