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

Orphaned templates cause DDM upgrade to fail

    Details

      Description

      Steps to Reproduce

      1. Start up any version of 6.1.x (I verified with 6.1.30 SP5) using a regular database (like MySQL) and sign in as an administrator
      2. Navigate to Manage > Site Content and select "Dynamic Data Lists"
      3. Select "Manage Data Definitions"
      4. Create a new data definition "Structure 1" with one field
      5. Select the "Manage Templates" action for "Structure 1"
      6. Add a detail template named "Template 1"
      7. Select "Back" to return to the list of structures
      8. Delete Structure 1
      9. Shutdown your 6.1.x bundle
      10. Point the DB upgrade tool to the database for your 6.1 instance
      11. Run the DB upgrade tool

      Expected result is that the upgrade succeeds.

      Actual result is the upgrade for DDM fails with a NullPointerException.

      Caused by: java.lang.NullPointerException
      	at com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping.getTemplateResourceClassNameId(UpgradeDynamicDataMapping.java:515)
      	at com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping.upgradeTemplatesAndAddTemplateVersions(UpgradeDynamicDataMapping.java:1348)
      	at com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping.doUpgrade(UpgradeDynamicDataMapping.java:257)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
      

        Attachments

          Activity

            People

            • Assignee:
              joyce.wang Joyce Wang
              Reporter:
              minhchau.dang Minhchau Dang
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.X
                7.1.X
                Master