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

S3Store throws FileNotFoundException when attempting to retrieve a file

    Details

      Description

      Description
      FileNotFoundException is being thrown when using S3 Store. This occurs when attempting to cache the retrieved files from the S3 Store.
      Regression bug prevents S3 file cache directory from being created.

      Steps to Reproduce

      1. Prepare the latest Liferay Master
        • reproducible using git: 0d14b5d8e2eb448a6dca0e78873bffa10d356b84
      2. Use a clean Liferay environment (make sure tomcat/temp is clean)
      3. Startup Liferay with S3 Store setup
      4. Navigate to Documents and Media
      5. Create a Basic Document
      6. Edit the created document

      Expected Results
      No errors are shown in the console

      Actual Results
      FileNotFoundException exceptions are thrown in the console

      Log Sample

      23:06:31,348 WARN  [liferay/document_library_raw_metadata_processor-1][RawMetadataProcessorMessageListener:38] Unable to save metadata for file version 35402
      com.liferay.portal.kernel.exception.SystemException: java.io.FileNotFoundException: /Users/liferay/Liferay/development/deploy/master/tomcat-8.0.32/temp/liferay/s3/2017/10/12/23/3021507849582000 (No such file or directory)
      	at com.liferay.portal.store.s3.S3Store.getFile(S3Store.java:192)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:269)
      	at com.liferay.document.library.kernel.store.DLStoreUtil.getFile(DLStoreUtil.java:325)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1184)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1167)
      	...
      	at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFile(DLFileEntryLocalServiceUtil.java:511)
      	at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFile(LiferayFileVersion.java:147)
      	at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl.saveMetadata(RawMetadataProcessorImpl.java:131)
      	at com.liferay.document.library.kernel.util.RawMetadataProcessorUtil.saveMetadata(RawMetadataProcessorUtil.java:113)
      	at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:34)
      	...
      Caused by: java.io.FileNotFoundException: /Users/liferay/Liferay/development/deploy/master/tomcat-8.0.32/temp/liferay/s3/2017/10/12/23/3021507849582000 (No such file or directory)
      	at java.io.FileOutputStream.open0(Native Method)
      	at java.io.FileOutputStream.open(FileOutputStream.java:270)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
      	at com.liferay.portal.store.s3.S3FileCacheImpl.getCacheFile(S3FileCacheImpl.java:121)
      	at com.liferay.portal.store.s3.S3Store.getFile(S3Store.java:185)
      	... 47 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              eric.yan Eric Yan
              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:
                3 years, 46 weeks ago

                  Packages

                  Version Package
                  7.1.X
                  Master