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

Upgrade from 6.1 to 6.2 fails on verfiying DDMStructures

    Details

      Description

      Unfortunately, I'm not sure about the exact sequence of actions required to produce the data structure leading to this issue. It is related to LPS-43057 (the fix for LPS-43057 is incomplete). The cause is WCM Structures with complicated parent-child relations. The following sequence should trigger the bug:

      • create a new structure A
      • create a new structure B
      • create a new structure C
      • make A a child of C
      • make B a child of C

      Effect without fix for LPS-43057:
      13:12:26,621 INFO [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_2_0.UpgradeJournal
      13:12:27,012 ERROR [localhost-startStop-1][UpgradeJournal:106] Unable to upgrade dynamic data mapping structure with UUID 78183f19-dae8-42a1-a869-417754cdacd1
      13:12:27,027 ERROR [localhost-startStop-1][MainServlet:209] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Eine Zeile mit doppeltem Schlüssel kann in das dbo.DDMStructure-Objekt mit dem eindeutigen IX_85C7EBE2-Index nicht eingefügt werden. Der doppelte Schlüsselwert ist (78183f19-dae8-42a1-a869-417754cdacd1, 10179).
      (Short translation: Duplicate key constraint violation)

      After applying the fix for LPS-43057, this step succeeds, but the database is not correct:
      14:27:17,027 INFO [localhost-startStop-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyDynamicDataMapping
      14:27:17,230 ERROR [localhost-startStop-1][MainServlet:209] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portlet.dynamicdatamapping.NoSuchStructureException: No DDMStructure exists with the primary key 2243907
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portlet.dynamicdatamapping.NoSuchStructureException: No DDMStructure exists with the primary key 2243907

      Fortunately, I've got a working fix.

      I've traced down the problem to the Upgrading of JournalStructures to DDMStructures. The ddmStructureId is incremented (and used) even if the structure has already been added previously.

      Will attach patch soon.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 20 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M2