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

Importing Asset Publisher LAR that contains configuration to externally scoped site results in java.lang.UnsupportedOperationException

    Details

      Description

      Resolved with LPS-67838. However, for tracking purposes, I will be opening a new LPS for this issue.

      Description:
      If Asset Publisher portlet's scope is configured to include another site in the instance, and the Asset Publisher portlet's configuration is exported to a LAR, importing this LAR will result in an error.

      Steps to reproduce:

      1. Add a Asset Publisher portlet to the public Liferay DXP (i.e. default home page)
      2. Create a blank site (e.g. New Site) and add a public page
      3. In New Site, add a Message board portlet and post a new thread
      4. Go back to Liferay DXP (default) site's Asset publisher portlet, and configure it as follows: Setup > Asset Selection > Source > Scope > Select > Other Site > New Site > Save
      5. In the Asset publisher portlet, click the tricolon (⁝) > Import/Export > Export > New Export Process > Export (with default settings), then once it's complete, download the LAR file
      6. After the LAR file has been downloaded, click the import tab > New Import Process > Select file > select the LAR file in exported in the last step > Continue > Import

      Expected Result:
      Import will be successful without errors.

      Actual Results:
      Failed import with the following errors:

      • UI
        • An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
          java.lang.UnsupportedOperationException
      • Error in Console
        • 01:50:18,418 WARN  [liferay/background_task-1][PortletImportBackgroundTaskExecutor:94] Unable to import portlet: java.lang.UnsupportedOperationException
          01:50:18,426 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:165] Unable to execute background task
          com.liferay.exportimport.kernel.lar.PortletDataException: java.lang.UnsupportedOperationException
          	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importMissingReference(BaseStagedModelDataHandler.java:323)
          	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.doImportMissingReference(BaseStagedModelDataHandler.java:485)
          	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importMissingReference(BaseStagedModelDataHandler.java:297)
          	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:394)
          	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:227)
          	at com.liferay.exportimport.portlet.preferences.processor.capability.ReferencedStagedModelImporterCapability.process(ReferencedStagedModelImporterCapability.java:121)
          	at com.liferay.exportimport.controller.PortletImportController.importPortletPreferences(PortletImportController.java:985)
          	at com.liferay.exportimport.controller.PortletImportController.doImportPortletInfo(PortletImportController.java:591)
          	at com.liferay.exportimport.controller.PortletImportController.importFile(PortletImportController.java:227)
          	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:373)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:498)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
          	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
          	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:46)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:39)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:51)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:174)
          	at com.sun.proxy.$Proxy103.importPortletInfo(Unknown Source)
          	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:230)
          	at com.liferay.exportimport.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:124)
          	at com.liferay.exportimport.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:110)
          	at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:101)
          	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
          	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:47)
          	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
          	at com.liferay.exportimport.background.task.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:85)
          	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54)
          	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
          	at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56)
          	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:124)
          	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
          	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
          	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
          	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
          	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: java.lang.UnsupportedOperationException
          	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.doImportMissingReference(BaseStagedModelDataHandler.java:493)
          	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importMissingReference(BaseStagedModelDataHandler.java:316)
          	... 59 more

      Reproduced in:
      - 
DXP + FP-4

      • ee-7.0.x branch commit 3914a6090bb0be86e540eb6f90ae322f1bb30e28

      Fixed in:

      • liferay-portal master commit 6ca433a69f78a2f8a759167c416dc29f7bcf4b33

        Attachments

          Activity

            People

            Assignee:
            hong.zhao Hong Zhao (Inactive)
            Reporter:
            christopher.kian Christopher Kian
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 38 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP9
                7.0.0 DXP SP2
                7.0.3 CE GA4