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

Unable to delete portal instance after upgrade from 6.1.2 to 6.2.0 because of missing DDMStructure

    Details

      Description

      1. Start a vanilla 6.1.20 portal
      2. Go to Control Panel > Portal Instances and add 2 additional portal instances e.g. portal1 and portal2
      3. Log out and log in to the portal1 portal instance
      4. Go to Document Management and add a Basic Document, e.g. an image file
      5. Shut down the server and upgrade the database to either 6.2.X or Master
      6. After the upgrade is complete, log in to the default Liferay portal instance
      7. Go to Control Panel > Portal Instances and delete the portal2 portal instance. This should succeed.
      8. Now delete the portal1 portal instance that contains the document you added before the upgrade

      Result: Error message is displayed on the UI and exception in the log tells that a DDM structure is missing

      com.liferay.portlet.dynamicdatamapping.NoSuchStructureException: No DDMStructure exists with the primary key 10837
              at com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMStructurePersistenceImpl.findByPrimaryKey(DDMStructurePersistenceImpl.java:8981)
              at com.liferay.portlet.dynamicdatamapping.service.persistence.impl.DDMStructurePersistenceImpl.findByPrimaryKey(DDMStructurePersistenceImpl.java:8998)
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl.getStructure(DDMStructureLocalServiceImpl.java:743)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:53)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
              at com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil.getStructure(DDMStructureLocalServiceUtil.java:937)
              at com.liferay.portlet.dynamicdatamapping.model.impl.DDMStorageLinkImpl.getStructure(DDMStorageLinkImpl.java:38)
              at com.liferay.portlet.dynamicdatamapping.model.impl.DDMStorageLinkImpl.getStorageType(DDMStorageLinkImpl.java:31)
              at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineImpl.getClassStorageAdapter(StorageEngineImpl.java:212)
              at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineImpl.deleteByClass(StorageEngineImpl.java:50)
              at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil.deleteByClass(StorageEngineUtil.java:41)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl.deleteFileEntryMetadata(DLFileEntryMetadataLocalServiceImpl.java:163)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl.deleteFileEntryMetadata(DLFileEntryMetadataLocalServiceImpl.java:44)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:53)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      

      The root cause is a bug in 6.1.20 (LPS-30576) whereas a separate DLFileEntryMetadata gets created and assigned to a single DLFileEntry with each company's TikaRawMetadata structure.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 23 weeks ago

                  Packages

                  Version Package
                  7.0.0 M2