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

NullPointerException thrown when enabling staging with a Web Content article referenced from a deleted site

    Details

      Description

      Steps to Reproduce

      1. Create two sites, Site A and Site B
      2. On Site A create a new Web Content article
      3. On Site B add the Web Content Display widget to a page and choose the article created in Site A
      4. Delete Site A
      5. Enable Local Live Staging for Site B

      Expected Results

      Staging would be enabled successfully.

      Actual Results

      The follow exception is thrown and staging is not enabled:

      2018-11-30 15:31:54.916 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:173] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:149)
      	at com.liferay.exportimport.data.handler.base.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:80)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportStagedModel(StagedModelDataHandlerUtil.java:183)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportReferenceStagedModel(StagedModelDataHandlerUtil.java:159)
      	at com.liferay.layout.internal.exportimport.data.handler.StagedLayoutSetStagedModelDataHandler.exportLayouts(StagedLayoutSetStagedModelDataHandler.java:395)
      	at com.liferay.layout.internal.exportimport.data.handler.StagedLayoutSetStagedModelDataHandler.doExportStagedModel(StagedLayoutSetStagedModelDataHandler.java:201)
      	at com.liferay.layout.internal.exportimport.data.handler.StagedLayoutSetStagedModelDataHandler.doExportStagedModel(StagedLayoutSetStagedModelDataHandler.java:85)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:102)
      	at com.liferay.exportimport.data.handler.base.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:80)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportStagedModel(StagedModelDataHandlerUtil.java:183)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportReferenceStagedModel(StagedModelDataHandlerUtil.java:159)
      	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doExportStagedModel(StagedGroupStagedModelDataHandler.java:242)
      	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doExportStagedModel(StagedGroupStagedModelDataHandler.java:78)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:102)
      	at com.liferay.exportimport.data.handler.base.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:80)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportStagedModel(StagedModelDataHandlerUtil.java:183)
      	at com.liferay.exportimport.internal.controller.LayoutExportController.doExport(LayoutExportController.java:334)
      	at com.liferay.exportimport.internal.controller.LayoutExportController.export(LayoutExportController.java:126)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.exportLayoutsAsFile(ExportImportLocalServiceImpl.java:66)
      	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.AopMethod.invoke(AopMethod.java:88)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:96)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:129)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:52)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:66)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:93)
      	at com.liferay.portal.spring.aop.ServiceBeanAopInvocationHandler.invoke(ServiceBeanAopInvocationHandler.java:45)
      	at com.sun.proxy.$Proxy98.exportLayoutsAsFile(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.exportLayoutsAsFile(ExportImportLocalServiceUtil.java:46)
      	at com.liferay.exportimport.internal.background.task.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:139)
      	at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
      	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
      	at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:75)
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:132)
      	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:752)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      	at com.liferay.journal.content.web.internal.exportimport.portlet.preferences.processor.JournalContentExportImportPortletPreferencesProcessor.processExportPortletPreferences(JournalContentExportImportPortletPreferencesProcessor.java:138)
      	at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.exportPortletPreference(PortletExportControllerImpl.java:1060)
      	at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.exportPortletPreferences(PortletExportControllerImpl.java:1157)
      	at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.exportPortlet(PortletExportControllerImpl.java:515)
      	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.exportLayoutPortlets(LayoutStagedModelDataHandler.java:821)
      	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.doExportStagedModel(LayoutStagedModelDataHandler.java:320)
      	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.doExportStagedModel(LayoutStagedModelDataHandler.java:129)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:102)
      	... 42 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 4 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP66
                  7.0.X
                  7.1.10 DXP FP5
                  7.1.10.1 SP1
                  7.1.2 CE GA3
                  7.1.X
                  Master