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

Cannot publish DLFileEntry because createDate is null

    Details

      Description

      Steps to reproduce

      1. Create a new site with a page
      2. Activate Staging
      3. Add a new Document to DL
      4. Add a DL Display portlet to the page
      5. Publish to live

      Result:

      12:01:52,233 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:145] Unable to execute background task
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:140)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:50)
              at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:35)
              at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:49)
              at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:118)
              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: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: com.liferay.portal.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:399)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:152)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:77)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:313)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:299)
              at com.liferay.portlet.documentlibrary.lar.DLPortletDataHandler.doImportData(DLPortletDataHandler.java:246)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:370)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:190)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:724)
              at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:750)
              at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:140)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1855)
              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:149)
              at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:181)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:139)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy108.importLayouts(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1214)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:211)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:184)
              at com.liferay.portal.spring.transaction.TransactionHandlerUtil$CallableMethodInvocation.proceed(TransactionHandlerUtil.java:130)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
              at com.liferay.portal.spring.transaction.TransactionHandlerUtil.invoke(TransactionHandlerUtil.java:52)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:98)
              ... 10 more
      Caused by: java.lang.NullPointerException
              at com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl.addUniqueActivity(SocialActivityLocalServiceImpl.java:309)
              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:149)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy171.addUniqueActivity(Unknown Source)
              at com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl.updateStatus(DLAppHelperLocalServiceImpl.java:1392)
              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:149)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy117.updateStatus(Unknown Source)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.updateStatus(DLFileEntryLocalServiceImpl.java:1929)
              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:149)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy113.updateStatus(Unknown Source)
              at com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil.updateStatus(DLFileEntryLocalServiceUtil.java:920)
              at com.liferay.portlet.documentlibrary.workflow.DLFileEntryWorkflowHandler.updateStatus(DLFileEntryWorkflowHandler.java:115)
              at com.liferay.portlet.documentlibrary.workflow.DLFileEntryWorkflowHandler.updateStatus(DLFileEntryWorkflowHandler.java:45)
              at com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil.startWorkflowInstance(WorkflowHandlerRegistryUtil.java:171)
              at com.liferay.portlet.documentlibrary.util.DLImpl.startWorkflowInstance(DLImpl.java:1354)
              at com.liferay.portlet.documentlibrary.util.DLUtil.startWorkflowInstance(DLUtil.java:427)
              at com.liferay.portal.repository.capabilities.LiferayWorkflowCapability.addFileEntry(LiferayWorkflowCapability.java:58)
              at com.liferay.portal.repository.liferayrepository.LiferayWorkflowLocalRepositoryWrapper.addFileEntry(LiferayWorkflowLocalRepositoryWrapper.java:82)
              at com.liferay.portal.repository.capabilities.CapabilityLocalRepository.addFileEntry(CapabilityLocalRepository.java:78)
              at com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.addFileEntry(DLAppLocalServiceImpl.java:299)
              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:149)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy183.addFileEntry(Unknown Source)
              at com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil.addFileEntry(DLAppLocalServiceUtil.java:185)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:428)
              at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:77)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:369)
              ... 42 more
      

      Please note that any newly created entity has null createDate and modifiedDate attributes after import. DL fails because it would try to use these dates in SocialActivityLocalService

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                beck.liu Beck Liu
                Reporter:
                akos.thurzo Akos Thurzo (Inactive)
                Participants of an Issue:
                Recent user:
                Brian Wulbern
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 23 weeks ago

                  Packages

                  Version Package
                  7.0.0 M6