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

Documents fail to export if binary is missing/inaccessible

    Details

      Description

      When exporting a user's personal documents via "Export Personal Data", the entire export process will fail if the underlying binary is missing or inaccessible. In such cases, we should simply log the exception.

      Below is the server log:

      com.liferay.portal.kernel.exception.PortalException: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=1, repositoryId=6980273, fileName=273071, cause=java.io.FileNotFoundException: /Users/deju/Desktop/dev/portal-archives/liferay-dxp-7.1.10-ga1/data/document_library/1/6980273/273071/1.0 (No such file or directory)}
      	at com.liferay.user.associated.data.exporter.DynamicQueryUADExporter.lambda$exportAll$0(DynamicQueryUADExporter.java:72)
      	at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performAction(DefaultActionableDynamicQuery.java:406)
      	at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:316)
      	at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:278)
      	at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:336)
      	at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86)
      	at com.liferay.user.associated.data.exporter.DynamicQueryUADExporter.exportAll(DynamicQueryUADExporter.java:76)
      	at com.liferay.user.associated.data.web.internal.export.controller.UADApplicationExportController._exportApplicationData(UADApplicationExportController.java:75)
      	at com.liferay.user.associated.data.web.internal.export.controller.UADApplicationExportController.export(UADApplicationExportController.java:55)
      	at com.liferay.user.associated.data.web.internal.export.background.task.UADExportBackgroundTaskExecutor.execute(UADExportBackgroundTaskExecutor.java:59)
      	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:127)
      	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:748)
      Caused by: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=1, repositoryId=6980273, fileName=273071, cause=java.io.FileNotFoundException: /Users/deju/Desktop/dev/portal-archives/liferay-dxp-7.1.10-ga1/data/document_library/1/6980273/273071/1.0 (No such file or directory)}
      	at com.liferay.portal.store.file.system.FileSystemStore.getFileAsStream(FileSystemStore.java:278)
      	at com.liferay.portal.store.ignore.duplicates.wrapper.internal.IgnoreDuplicatesStore.getFileAsStream(IgnoreDuplicatesStore.java:198)
      	at com.liferay.portal.store.safe.file.name.wrapper.internal.SafeFileNameStore.getFileAsStream(SafeFileNameStore.java:259)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFileAsStream(DLStoreImpl.java:320)
      	at com.liferay.document.library.kernel.store.DLStoreUtil.getFileAsStream(DLStoreUtil.java:406)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1195)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1170)
      	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:156)
      	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:133)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:139)
      	at com.sun.proxy.$Proxy122.getFileAsStream(Unknown Source)
      	at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileAsStream(DLFileEntryLocalServiceUtil.java:560)
      	at com.liferay.portlet.documentlibrary.model.impl.DLFileEntryImpl.getContentStream(DLFileEntryImpl.java:86)
      	at com.liferay.portlet.documentlibrary.model.impl.DLFileEntryImpl.getContentStream(DLFileEntryImpl.java:81)
      	at com.liferay.document.library.uad.exporter.DLFileEntryUADExporter.writeToZip(DLFileEntryUADExporter.java:38)
      	at com.liferay.document.library.uad.exporter.DLFileEntryUADExporter.writeToZip(DLFileEntryUADExporter.java:28)
      	at com.liferay.user.associated.data.exporter.DynamicQueryUADExporter.lambda$exportAll$0(DynamicQueryUADExporter.java:69)
      	... 18 more
      Caused by: java.io.FileNotFoundException: /Users/deju/Desktop/dev/portal-archives/liferay-dxp-7.1.10-ga1/data/document_library/1/6980273/273071/1.0 (No such file or directory)
      	at java.io.FileInputStream.open0(Native Method)
      	at java.io.FileInputStream.open(FileInputStream.java:195)
      	at java.io.FileInputStream.<init>(FileInputStream.java:138)
      	at com.liferay.portal.store.file.system.FileSystemStore.getFileAsStream(FileSystemStore.java:275)
      	... 42 more
      

        Attachments

          Activity

            People

            Assignee:
            sharry.shi Sharry Shi
            Reporter:
            dennis.ju Dennis Ju (Inactive)
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master