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

DuplicateFileException is thrown when importing lar file

    Details

      Description

      Error is thrown after adding a PDF document with more than one page.

      After the preview is generated, export and then import the site pages.

      The following exception will be displayed

      ERROR [liferay/background_task-1][BackgroundTaskMessageListener:137] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portlet.documentlibrary.DuplicateFileException: /Users/Marcellus/Liferay/bundles/liferay-portal/data/document_library/10156/0/document_preview/10187/227/11235/11236/0.png/1.0
      	at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:234)
      	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:299)
      	at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:289)
      	at com.liferay.portlet.documentlibrary.lar.DLPortletDataHandler.doImportData(DLPortletDataHandler.java:207)
      	at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:379)
      	at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:175)
      	at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:645)
      	at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:628)
      	at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:115)
      	at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1815)
      	at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1864)
      	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:140)
      	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:55)
      	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.$Proxy66.importLayouts(Unknown Source)
      	at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1309)
      	at com.liferay.portal.lar.backgroundtask.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:61)
      	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:56)
      	at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:111)
      	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:71)
      	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: com.liferay.portlet.documentlibrary.DuplicateFileException: /Users/Marcellus/Liferay/bundles/liferay-portal/data/document_library/10156/0/document_preview/10187/227/11235/11236/0.png/1.0
      	at com.liferay.portlet.documentlibrary.store.FileSystemStore.addFile(FileSystemStore.java:76)
      	at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:65)
      	at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:85)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:134)
      	at com.liferay.portlet.documentlibrary.store.DLStoreUtil.addFile(DLStoreUtil.java:146)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:251)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.importPreviewFromLAR(DLPreviewableProcessor.java:1119)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.importPreview(DLPreviewableProcessor.java:1034)
      	at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl.importPreviews(PDFProcessorImpl.java:314)
      	at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl.doImportGeneratedFiles(PDFProcessorImpl.java:247)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.importGeneratedFiles(DLPreviewableProcessor.java:156)
      	at com.liferay.portlet.documentlibrary.util.DLProcessorRegistryImpl.importGeneratedFiles(DLProcessorRegistryImpl.java:129)
      	at com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil.importGeneratedFiles(DLProcessorRegistryUtil.java:61)
      	at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:485)
      	at com.liferay.portlet.documentlibrary.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:1)
      	at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:222)
      	... 36 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 19 weeks ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1