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

AMRuntimeException errors appear when checking in a document after reuploading a file

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: DM, DM > Adaptive Media
    • Labels:
    • Fix Priority:
      4
    • Sprint:
      025 - Pikachu

      Description

      Steps to reproduce:

      1. Add a document
      2. Check out document
      3. Edit document
      4. Upload a different image than the file one previously uploaded
      5. Check in document

      Expected result:
      Document is checked in with no errors.

      Actual result:
      Errors appear.

      2019-03-26 14:01:47.019 INFO  [main][PropsUtil:419] Portal lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
      2019-03-26 06:10:43.262 WARN  [liferay/adaptive_media_processor-1][AMMessageListener:81] com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20099, repositoryId=20126, fileName=2, cause=java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\2\PWC (The system cannot find the file specified)}
      com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20099, repositoryId=20126, fileName=2, cause=java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\2\PWC (The system cannot find the file specified)}
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler._getInputStream(AMDefaultImageScaler.java:87)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.lambda$scaleImage$0(AMDefaultImageScaler.java:53)
              at com.liferay.adaptive.media.image.internal.processor.util.TiffOrientationTransformer.transform(TiffOrientationTransformer.java:54)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.scaleImage(AMDefaultImageScaler.java:52)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:123)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.lambda$process$0(AMImageProcessorImpl.java:76)
              at java.util.ArrayList.forEach(ArrayList.java:1257)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:75)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:43)
              at com.liferay.adaptive.media.web.internal.messaging.AMProcessorCommand$2.execute(AMProcessorCommand.java:43)
              at com.liferay.adaptive.media.web.internal.messaging.AMMessageListener.doReceive(AMMessageListener.java:77)
              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:752)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20099, repositoryId=20126, fileName=2, cause=java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\2\PWC (The system cannot find the file specified)}
              at com.liferay.portal.store.file.system.FileSystemStore.getFileAsStream(FileSystemStore.java:281)
              at com.liferay.portal.store.ignore.duplicates.wrapper.internal.IgnoreDuplicatesStore.getFileAsStream(IgnoreDuplicatesStore.java:178)
              at com.liferay.portal.store.safe.file.name.wrapper.internal.SafeFileNameStore.getFileAsStream(SafeFileNameStore.java:279)
              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:1152)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1135)
              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.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
              at com.sun.proxy.$Proxy56.getFileAsStream(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileAsStream(DLFileEntryLocalServiceUtil.java:667)
              at com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl.getContentStream(DLFileVersionImpl.java:60)
              at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getContentStream(LiferayFileVersion.java:106)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler._getInputStream(AMDefaultImageScaler.java:84)
              ... 16 more
      Caused by: java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\2\PWC (The system cannot find the file specified)
              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:278)
              ... 38 more
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      Mar 26, 2019 2:14:48 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
      INFO: Detected server tomcat
      2019-03-26 14:14:53.008 INFO  [main][PropsUtil:385] Global shared lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/lib/
      2019-03-26 14:14:53.017 INFO  [main][PropsUtil:396] Global lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/lib/ext/
      2019-03-26 14:14:53.019 INFO  [main][PropsUtil:419] Portal lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      Mar 26, 2019 2:16:25 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
      INFO: Detected server tomcat
      2019-03-26 14:16:29.916 INFO  [main][PropsUtil:385] Global shared lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/lib/
      2019-03-26 14:16:29.924 INFO  [main][PropsUtil:396] Global lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/lib/ext/
      2019-03-26 14:16:29.927 INFO  [main][PropsUtil:419] Portal lib directory /C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-portal-master/tomcat-9.0.10/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
      2019-03-26 06:18:21.370 WARN  [liferay/adaptive_media_processor-1][AMMessageListener:81] com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20099, repositoryId=20126, fileName=5, cause=java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\5\PWC (The system cannot find the file specified)}
      com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20099, repositoryId=20126, fileName=5, cause=java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\5\PWC (The system cannot find the file specified)}
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler._getInputStream(AMDefaultImageScaler.java:87)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.lambda$scaleImage$0(AMDefaultImageScaler.java:53)
              at com.liferay.adaptive.media.image.internal.processor.util.TiffOrientationTransformer.transform(TiffOrientationTransformer.java:54)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler.scaleImage(AMDefaultImageScaler.java:52)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:123)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.lambda$process$0(AMImageProcessorImpl.java:76)
              at java.util.ArrayList.forEach(ArrayList.java:1257)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:75)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:43)
              at com.liferay.adaptive.media.web.internal.messaging.AMProcessorCommand$2.execute(AMProcessorCommand.java:43)
              at com.liferay.adaptive.media.web.internal.messaging.AMMessageListener.doReceive(AMMessageListener.java:77)
              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:752)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20099, repositoryId=20126, fileName=5, cause=java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\5\PWC (The system cannot find the file specified)}
              at com.liferay.portal.store.file.system.FileSystemStore.getFileAsStream(FileSystemStore.java:281)
              at com.liferay.portal.store.ignore.duplicates.wrapper.internal.IgnoreDuplicatesStore.getFileAsStream(IgnoreDuplicatesStore.java:178)
              at com.liferay.portal.store.safe.file.name.wrapper.internal.SafeFileNameStore.getFileAsStream(SafeFileNameStore.java:279)
              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:1152)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1135)
              at sun.reflect.GeneratedMethodAccessor641.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
              at com.sun.proxy.$Proxy56.getFileAsStream(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileAsStream(DLFileEntryLocalServiceUtil.java:667)
              at com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl.getContentStream(DLFileVersionImpl.java:60)
              at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getContentStream(LiferayFileVersion.java:106)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler._getInputStream(AMDefaultImageScaler.java:84)
              ... 16 more
      Caused by: java.io.FileNotFoundException: C:\Users\liferay\Desktop\liferay-portal-master\data\document_library\20099\20126\5\PWC (The system cannot find the file specified)
              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:278)
              ... 37 more
      

      Reproduced on:
      Tomcat 9.0.10 + MySQL 5.7.
      Portal master ff37027c5444b07f828061372960853cdb22199c
      Portal 7.2 Alpha

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  14 weeks, 4 days ago

                  Packages

                  Version Package