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

java.lang.NullPointerException error when publish at staging local and no webcontent are modified

    Details

      Description

      The issue is not reproduced at master.

      The issue is reproduced at 6.2.x branch following this steps:

      1. Create a new site
      2. Import two images at document library
      3. Activate local staging
      4. Create one page
      5. At this page add two webcontent, at ckeditor, each webcontent must include a image from DL:
      6. Publish to Live:
        1. At "Content" section, select "Choose Content" => "Date Range" => "From Last Publish Date Change"
        2. The publication process will work fine
      7. Reorder webcontent portlets at page (And/Or) Add other non webcontent portlet, like blog portlet
      8. Publish again to live:
        1. At "Content" section, select "Choose Content" => "Date Range" => "From Last Publish Date Change"
        2. The publication process will FAIL, showing the error "java.lang.NullPointerException"

      IMPORTANT: At 6.2 SP5 version, the issue is also reproduced when you Publish to Live and at "Content" section, select "All Content", this problem is fixed with LPS-42218, but this is not included at SP5, so this other LPS must be also added to future fixpacks.

      At log file, the folowing error will be shown:

       
      10:15:29,742 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:170)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:324)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModels(StagedModelDataHandlerUtil.java:285)
              at com.liferay.portlet.journal.lar.JournalContentPortletDataHandler.doProcessImportPortletPreferences(JournalContentPortletDataHandler.java:214)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.processImportPortletPreferences(BasePortletDataHandler.java:585)
              at com.liferay.portal.lar.PortletImporter.importPortletPreferences(PortletImporter.java:1159)
              at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:589)
              at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:117)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1761)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              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.$Proxy33.importLayouts(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1282)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingCallable.call(LayoutStagingBackgroundTaskExecutor.java:184)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingCallable.call(LayoutStagingBackgroundTaskExecutor.java:1)
              at com.liferay.portal.spring.transaction.TransactionalCallableUtil$CallableMethodInvocation.proceed(TransactionalCallableUtil.java:84)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionalCallableUtil.call(TransactionalCallableUtil.java:36)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:76)
              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:744)
      Caused by: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil._getStagedModel(StagedModelDataHandlerUtil.java:331)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:312)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:232)
              at com.liferay.portal.lar.ExportImportHelperImpl.replaceImportDLReferences(ExportImportHelperImpl.java:955)
              at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceImportDLReferences(ExportImportHelperUtil.java:185)
              at com.liferay.portal.lar.ExportImportHelperImpl.replaceImportContentReferences(ExportImportHelperImpl.java:903)
              at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceImportContentReferences(ExportImportHelperUtil.java:175)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:417)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:161)
              ... 37 more
      

        Attachments

        1. fixed.png
          fixed.png
          61 kB
        2. reproduced.png
          reproduced.png
          54 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 24 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1