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

calendar failed to upgrade due to SQLIntegrityConstraintViolationException

    Details

      Description

      Steps to reproduce

      1. Add a role in 6012.
        #Add a calendar portlet in page on 6012.
      2. Click in the "Permissions" button showed below and change the permission of this portlet. (Please be sure to change the permission of owner, user, and the role we just created)
      3. Execute the following sql:
         select * from ResourcePermission where name in ('com.liferay.calendar', 'com.liferay.portlet.calendar') 
         

        The name of the records are all in 'com.liferay.portlet.calendar'.

      4. Upgrade to 6.2 SP18.
        After upgraded successfully, there will be 'com.liferay.calendar' related records like the following:
        288	10136	com.liferay.portlet.calendar	4	10162	10145	0	14
        289	10136	com.liferay.portlet.calendar	4	10162	10149	0	0
        688	10136	com.liferay.calendar	4	10162	10145	0	6
        689	10136	com.liferay.calendar	4	10162	10149	0	2
         

        5. Upgrade to DXP SP1.

      Results

      After upgraded to dxp sp1, there will be Duplicate entry error as in the description.

      Caused by: org.mariadb.jdbc.internal.common.QueryException: Duplicate entry '10112-com.liferay.calendar-4-88857-10120' for key 'IX_8D83D0CE'
      at org.mariadb.jdbc.internal.mysql.MySQLProtocol.getResult(MySQLProtocol.java:995)
      at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:1050)
      at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:1030)
      at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:289)

        Attachments

        1. calendar-60x-permission.png
          calendar-60x-permission.png
          38 kB
        2. clean-6.0.x.png
          clean-6.0.x.png
          94 kB
        3. ee60x-ResourcePermission.txt
          0.4 kB
        4. ee60x-whole.sql
          402 kB
        5. ee62x-all.sql
          516 kB
        6. ee62x-ResourcePermission.txt
          0.5 kB
        7. upgraded-ee62x.png
          upgraded-ee62x.png
          98 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 46 weeks, 2 days ago

                Packages

                Version Package
                7.0.0 DXP FP22
                7.0.0 DXP SP4
                7.0.X EE
                7.0.4 CE GA5
                7.1.X
                Master