PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-48700

Uploading documents using document type from global scope causes error when importing a lar of the documents with no metadata types

    Details

    • Branch Version/s:
      6.2.x
    • Backported to Branch:
      Committed
    • Story Points:
      8
    • Fix Priority:
      2
    • Similar Issues:
      Show 5 results 

      Description

      Description
      Uploading documents using document type from global scope causes error when importing a lar of the documents

      Steps to reproduce
      1) Start a clean bundle of Liferay 6.2
      2) Create a document type in global scope
      2.1) Edit the document type source to contain <root available-locales="en_US" default-locale="en_US"></root>.
      3) Upload a document of that type but in a local site scope (liferay.com)
      4) Go to The Global site and export a LAR of the documents and media portlet.
      5) Shut down the server
      6) Start a new clean bundle of Liferay 6.2
      7) Go to the Global site > Documents and Media page in control panel
      8) Import the LAR from step 4

      Expected behavior: The LAR would import
      Actual Behavior No such meta data exceptions:

      22:07:32,577 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portlet.documentlibrary.NoSuchMetadataSetException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:170)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:317)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:307)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:225)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.importMetaData(FileEntryStagedModelDataHandler.java:572)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:294)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:161)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:116)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:317)
              at com.liferay.portal.lar.ExportImportHelperImpl.replaceImportDLReferences(ExportImportHelperImpl.java:939)
              at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceImportDLReferences(ExportImportHelperUtil.java:185)
              at com.liferay.portal.lar.ExportImportHelperImpl.replaceImportContentReferences(ExportImportHelperImpl.java:905)
              at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceImportContentReferences(ExportImportHelperUtil.java:175)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:375)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:161)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:317)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:307)
              at com.liferay.portlet.journal.lar.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:272)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:330)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:188)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:1004)
              at com.liferay.portal.lar.PortletImporter.doImportPortletInfo(PortletImporter.java:565)
              at com.liferay.portal.lar.PortletImporter.importPortletInfo(PortletImporter.java:207)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importPortletInfo(LayoutLocalServiceImpl.java:1888)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importPortletInfo(LayoutLocalServiceImpl.java:1956)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:180)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:141)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy32.importPortletInfo(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importPortletInfo(LayoutLocalServiceUtil.java:1385)
              at com.liferay.portal.lar.backgroundtask.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:61)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:56)
              at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:108)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portlet.documentlibrary.NoSuchMetadataSetException
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl.validate(DLFileEntryTypeLocalServiceImpl.java:662)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl.addFileEntryType(DLFileEntryTypeLocalServiceImpl.java:100)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy200.addFileEntryType(Unknown Source)
              at com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalServiceUtil.addFileEntryType(DLFileEntryTypeLocalServiceUtil.java:641)
              at com.liferay.portlet.documentlibrary.lar.DLFileEntryTypeStagedModelDataHandler.doImportStagedModel(DLFileEntryTypeStagedModelDataHandler.java:253)
              at com.liferay.portlet.documentlibrary.lar.DLFileEntryTypeStagedModelDataHandler.doImportStagedModel(DLFileEntryTypeStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:161)
              ... 69 more
      

      Branch 62x - cf455acc92b43eee8f43b103a809a0240828fba4: Can't test due to other error (see screenshot)
      Master - 1ac80c24533c9638edb57ef9ed35b3e80ea89d5a: Fixed1)

        Issue Links

          Activity

          Hide
          Sergio Gonzalez added a comment -

          Just started reviewing :)

          Sent from GH.

          Show
          Sergio Gonzalez added a comment - Just started reviewing :) Sent from GH .
          Hide
          Shitian "Shelton" Zhang added a comment -

          Reproduced on:
          Tomcat 7.0.42 + MySQL 5.5.34. Portal master GIT ID: b45e6646b18809abf13ddfb60d1d6566e22a8f8c.

          The NoSuchMetadataSetException is thrown.

          Show
          Shitian "Shelton" Zhang added a comment - Reproduced on: Tomcat 7.0.42 + MySQL 5.5.34. Portal master GIT ID: b45e6646b18809abf13ddfb60d1d6566e22a8f8c. The NoSuchMetadataSetException is thrown.
          Hide
          Shitian "Shelton" Zhang added a comment -

          PASSED Manual Testing following the steps in the description.

          Fixed on:
          Tomcat 7.0.42 + MySQL 5.5.34. Portal master GIT ID: e4c7bdb8f85c7cb0eff454fe1bc5687ccac33de5.

          Unable to update the document type due to the validation.

          Show
          Shitian "Shelton" Zhang added a comment - PASSED Manual Testing following the steps in the description. Fixed on: Tomcat 7.0.42 + MySQL 5.5.34. Portal master GIT ID: e4c7bdb8f85c7cb0eff454fe1bc5687ccac33de5. Unable to update the document type due to the validation.
          Hide
          Shitian "Shelton" Zhang added a comment -

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0.42 + MySQL 5.5. Portal 6.2 EE SP8.

          The NoSuchMetadataSetException is thrown.

          Fixed on:
          Tomcat 7.0.42 + MySQL 5.5. Portal ee-6.2.x EE GIT ID: b25f9ea2306508f883ad111abe4d4976263bb537.

          Unable to update the document type due to the validation.

          Show
          Shitian "Shelton" Zhang added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0.42 + MySQL 5.5. Portal 6.2 EE SP8. The NoSuchMetadataSetException is thrown. Fixed on: Tomcat 7.0.42 + MySQL 5.5. Portal ee-6.2.x EE GIT ID: b25f9ea2306508f883ad111abe4d4976263bb537. Unable to update the document type due to the validation.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                26 weeks, 4 days ago

                Development

                  Structure Helper Panel