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

Enabling local live staging fails with NPE if web content links to a file in another site

    Details

    • Story Points:
      3
    • Fix Priority:
      5
    • Similar Issues:
      Show 5 results 

      Description

      steps to reproduce:
      1. start up portal and navigate to the sites menu in the control panel
      2. go to Admin -> Control Panel -> Sites
      3. create a blank site "test"
      4. in the "test" site, go to Content -> documents and media and add a folder
      5. upload a file to the folder
      6. go back to sites menu and click on "liferay" site
      7. go to Content -> web content
      8. add a basic web content that contains a link to the file in "test"

      • 8a. in the add web content menu look at the "content" section and look for the chain link icon, when you hover over it is should say "link"
      • 8b. click on the link and a pop-up menu appears, click on "browse server"
      • 8c. in the next pop-up window, navigate to the file you created on "test" and click ok
      • 8d. publish the web content

      9. go to Configuration -> site settings -> staging and enable local live staging

      expected behavior: staging is enabled without errors
      actual behavior: error is thrown and the staging site is not created even though the enable radio button is set to "local live"

      23:54:07,122 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:328)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:190)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:1008)
              at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:607)
              at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:116)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1756)
              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:179)
              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 $Proxy31.importLayouts(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1279)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:90)
              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:619)
      Caused by: com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:147)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:319)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:309)
              at com.liferay.portlet.journal.lar.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:272)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:324)
              ... 29 more
      Caused by: com.liferay.portal.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:147)
              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:319)
              at com.liferay.portal.lar.ExportImportHelperImpl.replaceImportDLReferences(ExportImportHelperImpl.java:941)
              at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceImportDLReferences(ExportImportHelperUtil.java:184)
              at com.liferay.portal.lar.ExportImportHelperImpl.replaceImportContentReferences(ExportImportHelperImpl.java:907)
              at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceImportContentReferences(ExportImportHelperUtil.java:174)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:376)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:141)
              ... 33 more
      Caused by: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil._getStagedModelDataHandler(StagedModelDataHandlerUtil.java:377)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:317)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:259)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:141)
              ... 43 more
      

      This occurs no matter what site is used as long as it is different than the site being staged, and it occurs with both embedding an image file as well as simply using a link to a word document.

        Activity

        Hide
        Evan Nagayama added a comment -

        No Longer Reproducible through Manual Testing following the steps in the description.

        Reproduced on:
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 2f045421fa2f1e743a070733d1f400d78936ce7a.

        Show
        Evan Nagayama added a comment - No Longer Reproducible through Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 2f045421fa2f1e743a070733d1f400d78936ce7a.
        Hide
        Evan Nagayama added a comment - - edited

        L4 + S4 = PF5

        Show
        Evan Nagayama added a comment - - edited L4 + S4 = PF5
        Hide
        Shitian "Shelton" Zhang added a comment -

        PASSED Manual Testing following the steps in the description.

        Reproduced on:
        Tomcat 7.0 + MySQL 5. Portal ee-6.2.x EE GIT ID: ee01987cd7b2d627ae9d67072641feb0a8a22bbc.

        NullPointerException was thrown when enabling local live staging.

        Fixed on:
        Tomcat 7.0 + MySQL 5. Portal ee-6.2.x EE GIT ID: e29d365bb92611d178a8b79534d87b0cce63c276.

        No NullPointerException anymore.

        Show
        Shitian "Shelton" Zhang added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal ee-6.2.x EE GIT ID: ee01987cd7b2d627ae9d67072641feb0a8a22bbc. NullPointerException was thrown when enabling local live staging. Fixed on: Tomcat 7.0 + MySQL 5. Portal ee-6.2.x EE GIT ID: e29d365bb92611d178a8b79534d87b0cce63c276. No NullPointerException anymore.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 30 weeks, 3 days ago

              Development

                Structure Helper Panel