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

Upgrade from 6.2 to DXP fails during UpgradeMobileDeviceRules if a Device Family is added to a page

    Details

      Description

      Reproduction steps:

      1. Start up the portal (6.2)
      2. Log in
      3. Click on Admin -> Configuration
      4. Click on Mobile Device Families
      5. Add a Device Family
      6. Go to Pages -> Site Pages
      7. Click on Public Pages
      8. Click on Mobile Device Rules
      9. Click on Select Device Family
      10. Choose the created Device Family
      11. Hit Save
      12. Upgrade to DXP

      Experienced behavior: The upgrade fails with the below error:

      16:06:03,128 INFO  [main][UpgradeProcess:99] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 19625ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: Duplicate entry '20155-com.liferay.mobile.device.rules.model.MDRRuleGroupInstance' for key 'IX_8D83D0CE'
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:93)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
              at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:153)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:99)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: Duplicate entry '20155-com.liferay.mobile.device.rules.model.MDRRuleGroupInstance' for key 'IX_8D83D0CE'
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:93)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:117)
              at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:88)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:90)
              ... 7 more
      Caused by: java.sql.BatchUpdateException: Duplicate entry '20155-com.liferay.mobile.device.rules.model.MDRRuleGroupInstance' for key 'IX_8D83D0CE'
              at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1981)
              at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1393)
              at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
              at com.liferay.portal.kernel.dao.jdbc.AutoBatchPreparedStatementUtil$ConcurrentBatchInvocationHandler$1.call(AutoBatchPreparedStatementUtil.java:218)
              at com.liferay.portal.kernel.dao.jdbc.AutoBatchPreparedStatementUtil$ConcurrentBatchInvocationHandler$1.call(AutoBatchPreparedStatementUtil.java:213)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '20155-com.liferay.mobile.device.rules.model.MDRRuleGroupInstance' for key 'IX_8D83D0CE'
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
              at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
              at com.mysql.jdbc.Util.getInstance(Util.java:384)
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2334)
              at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1933)
              ... 9 more

      Expected behavior: You should be able to upgrade to dxp without any issues

      Reproduced
      on 7.0.x 646d006706815fcdbed7f7e03bfdc630bc63c963 (Oct.6)
       on 7.0.0 de-31 fix pack

      Cannot reproduced
      on 7.0.x commit 6a1f3038c429fc59586c696df30de7d44b0c3206 (Aug. 14)
       on 7.0.0 de-29 fix pack

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                felix.zhang Felix Zhang
                Reporter:
                amadea.fejes Amadea Fejes (Inactive)
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 49 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 DXP FP33
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.0.X
                  Master