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

UpgradeCalendar ends if duplicated entry on Portlet table

    Details

      Description

      In this scenerario in database:

      mysql> select * from Portlet where portletId like '%calendar%' or portletId = '8';
      -------------------------------------------------

      id_ companyId portletId roles active_

      -------------------------------------------------

      10231 10152 8   1
      10706 10152 1_WAR_calendarportlet   1

      -------------------------------------------------
      2 rows in set (0.00 sec)

      The UpgradeCalendar produces this stacktrace:

      13:42:54,542 INFO [main][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_2_0.UpgradeCalendar
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10152-1_WAR_calendarportlet' for key 'IX_12B5E51D'
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:181)
      at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:113)
      at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:66)
      at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46)
      at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:138)
      at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:61)
      at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:142)
      at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:73)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10152-1_WAR_calendarportlet' for key 'IX_12B5E51D'
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:181)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:195)
      at com.liferay.portal.upgrade.UpgradeProcess_6_2_0.doUpgrade(UpgradeProcess_6_2_0.java:67)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:178)
      ... 7 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10152-1_WAR_calendarportlet' for key 'IX_12B5E51D'
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      at com.mysql.jdbc.Util.getInstance(Util.java:386)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2788)
      at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1816)
      at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1730)
      at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
      at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:290)
      at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:312)
      at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:304)
      at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:36)
      at com.liferay.portal.upgrade.util.UpgradePortletId.updatePortlet(UpgradePortletId.java:301)
      at com.liferay.portal.upgrade.util.UpgradePortletId.doUpgrade(UpgradePortletId.java:53)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:178)
      ... 10 more
      sas

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              manuel.delapenya Manuel de la Peña (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 41 weeks, 1 day ago

                Packages

                Version Package
                6.2.0 CE GA1