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

After an upgrade from 6120 to 6210, a structure exception occurs when importing a Document Library LAR.

    Details

      Description

      Description
      After an upgrade from 6120 to 6210, a structure exception occurs when importing a Document Library LAR. I think this is a bug because exporting/importing worked in 6120.

      Steps To Reproduce
      1) Start a clean bundle of 6120.
      2) Go to Control Panel > Documents and Media > Manage document types > Create a new test document type called TEST.
      3) Shut down the portal.
      4) In the database, replace the XSD value for the TEST structure (in the ddmstructure table) with this code:

      <?xml version="1.0"?><root available-locales="en_US" default-locale="en_US"><dynamic-element autoGeneratedName="true" dataType="string" name="name" type="text"><meta-data locale="en_US"><entry name="label"><![CDATA[Name]]></entry><entry name="showLabel"><![CDATA[true]]></entry><entry name="required"><![CDATA[true]]></entry><entry name="predefinedValue"><![CDATA[]]></entry><entry name="tip"><![CDATA[]]></entry><entry name="width"><![CDATA[100]]></entry><entry name="fieldCssClass"><![CDATA[aui-w100]]></entry></meta-data></dynamic-element><dynamic-element autoGeneratedName="true" dataType="string" name="description" type="textarea"><meta-data locale="en_US"><entry name="label"><![CDATA[Long Description]]></entry><entry name="showLabel"><![CDATA[true]]></entry><entry name="required"><![CDATA[true]]></entry><entry name="predefinedValue"><![CDATA[]]></entry><entry name="tip"><![CDATA[]]></entry><entry name="width"><![CDATA[100]]></entry><entry name="fieldCssClass"><![CDATA[aui-w100]]></entry></meta-data></dynamic-element><dynamic-element autoGeneratedName="true" dataType="string" name="export-sequence" type="text"><meta-data locale="en_US"><entry name="label"><![CDATA[Export Sequence Number]]></entry><entry name="showLabel"><![CDATA[true]]></entry><entry name="required"><![CDATA[false]]></entry><entry name="predefinedValue"><![CDATA[]]></entry><entry name="tip"><![CDATA[]]></entry><entry name="width"><![CDATA[25]]></entry><entry name="fieldCssClass"><![CDATA[aui-w25]]></entry></meta-data></dynamic-element><dynamic-element autoGeneratedName="true" dataType="document-library" fieldNamespace="ddm" name="icon" type="ddm-documentlibrary"><meta-data locale="en_US"><entry name="label"><![CDATA[Icon]]></entry><entry name="showLabel"><![CDATA[true]]></entry><entry name="required"><![CDATA[false]]></entry><entry name="predefinedValue"><![CDATA[]]></entry><entry name="tip"><![CDATA[]]></entry></meta-data></dynamic-element><dynamic-element autoGeneratedName="true" dataType="string" name="package-refs" type="textarea"><meta-data locale="en_US"><entry name="label"><![CDATA[Package References]]></entry><entry name="showLabel"><![CDATA[true]]></entry><entry name="required"><![CDATA[true]]></entry><entry name="predefinedValue"><![CDATA[]]></entry><entry name="tip"><![CDATA[Comma delimited list of UUIDs that define the Packages that make up this Experience]]></entry><entry name="width"><![CDATA[100]]></entry><entry name="fieldCssClass"><![CDATA[aui-w100]]></entry></meta-data></dynamic-element></root>
      

      5) Start the portal and go to Control Panel > Documents and Media > Manage document types > select TEST and verify that the metadata has changed.
      6) Stop the portal and upgrade to 6.2 SP8.
      7) Go to the Liferay site in the Control Panel and export a LAR of the Documents and Media portlet.
      8) Create a new blank site and import the LAR.
      9) The com.liferay.portlet.dynamicdatamapping.StructureXsdException occurs.

      Expected result: the LAR would import.
      Actual Result: The LAR does not import.

      19:49:50,604 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /manifest.xml
      19:49:50,614 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/portlet/15/10230/portlet.xml
      19:49:50,616 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/categories-hierarchy.xml
      19:49:50,619 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/tags.xml
      19:49:50,621 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/comments.xml
      19:49:50,623 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/expando-tables.xml
      19:49:50,626 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/locks.xml
      19:49:50,628 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/ratings.xml
      19:49:50,631 DEBUG [liferay/background_task-1][PortletImporter:476] Deleting portlet data
      19:49:50,633 DEBUG [liferay/background_task-1][LayoutImporter:127] Import portlet data true
      19:49:50,635 DEBUG [liferay/background_task-1][LayoutImporter:128] Import all portlet data false
      19:49:50,636 DEBUG [liferay/background_task-1][LayoutImporter:129] Import portlet configuration true
      19:49:50,638 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/portlet/15/preferences/group/10227/0/portlet-preferences.xml
      19:49:50,641 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/portlet/15/preferences/layout/0/10230/portlet-preferences.xml
      19:49:50,648 DEBUG [liferay/background_task-1][PortletImporter:512] Importing portlet data
      19:49:50,650 DEBUG [liferay/background_task-1][PortletImporter:170] Importing data for 15
      19:49:50,651 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/portlet/15/10227/portlet-data.xml
      19:49:50,653 INFO  [liferay/background_task-1][BasePortletDataHandler:315] Importing portlet 15
      19:49:50,656 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/com.liferay.portlet.dynamicdatamapping.model.DDMStructure/10602.xml
      19:49:50,663 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/com.liferay.portlet.dynamicdatamapping.model.DDMStructure/10602-expando.xml
      19:49:50,678 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/com.liferay.portlet.dynamicdatamapping.model.DDMStructure/10603.xml
      19:49:50,684 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/com.liferay.portlet.dynamicdatamapping.model.DDMStructure/10603-expando.xml
      19:49:50,696 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/com.liferay.portlet.dynamicdatamapping.model.DDMStructure/10604.xml
      19:49:50,701 INFO  [liferay/background_task-1][PortletDataContextListenerImpl:42] Import /group/10227/com.liferay.portlet.dynamicdatamapping.model.DDMStructure/10604-expando.xml
      19:49:50,707 INFO  [liferay/background_task-1][BasePortletDataHandler:345] Imported portlet in 00:00:00.052
      19:49:50,718 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portlet.dynamicdatamapping.StructureXsdException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:170)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:321)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:311)
              at com.liferay.portlet.journal.lar.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:237)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:330)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:190)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:954)
              at com.liferay.portal.lar.PortletImporter.doImportPortletInfo(PortletImporter.java:515)
              at com.liferay.portal.lar.PortletImporter.importPortletInfo(PortletImporter.java:209)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importPortletInfo(LayoutLocalServiceImpl.java:1893)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importPortletInfo(LayoutLocalServiceImpl.java:1961)
              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:183)
              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.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.dynamicdatamapping.StructureXsdException
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl.doUpdateStructure(DDMStructureLocalServiceImpl.java:1468)
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl.updateStructure(DDMStructureLocalServiceImpl.java:1313)
              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.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy212.updateStructure(Unknown Source)
              at com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil.updateStructure(DDMStructureLocalServiceUtil.java:1472)
              at com.liferay.portlet.dynamicdatamapping.lar.DDMStructureStagedModelDataHandler.doImportStagedModel(DDMStructureStagedModelDataHandler.java:267)
              at com.liferay.portlet.dynamicdatamapping.lar.DDMStructureStagedModelDataHandler.doImportStagedModel(DDMStructureStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:161)
              ... 34 more
      

      Branch 62x - 90722f8d013f84b6c1a9f82b97dc4a7be0636aca: Can't test because i cannot do step 7 because of this error:

      19:56:51,193 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: java.lang.ArrayIndexOutOfBoundsException: 2
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:77)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.exportStagedModel(StagedModelDataHandlerUtil.java:173)
              at com.liferay.portlet.journal.lar.JournalPortletDataHandler.doExportData(JournalPortletDataHandler.java:179)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.exportData(BasePortletDataHandler.java:108)
              at com.liferay.portal.lar.PortletExporter.exportPortletData(PortletExporter.java:205)
              at com.liferay.portal.lar.PortletExporter.exportPortlet(PortletExporter.java:1015)
      

      Master - 1ac80c24533c9638edb57ef9ed35b3e80ea89d5a: Reproduced

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joyce.wang Joyce Wang
              Reporter:
              steven.smith Steven Smith (Inactive)
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 49 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M3