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

AMRuntimeException appears when uploading a fragment with thumbnails

Details

    Description

      Steps to reproduce:

      1. Navigate to Site Builder > Page Fragments > Collections > Import
      2. Upload a page fragment zip with thumbnails (see attached)

      Expected result:
      Page fragment is uploaded without exceptions.

      Actual result:
      Page fragment is uploaded with exceptions.

      This is not reproducible when there are no thumbnails (png files) in the zip. I've also attached this zip for reference.

      2019-09-09 02:32:57.832 WARN  [liferay/adaptive_media_processor-1][AMMessageListener:81] com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37435
      com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37435
              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.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37435
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15809)
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15827)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1134)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1125)
              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.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
              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:62)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy55.getFileAsStream(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileAsStream(DLFileEntryLocalServiceUtil.java:665)
              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.portal.kernel.repository.model.FileVersionWrapper.getContentStream(FileVersionWrapper.java:89)
              at com.liferay.adaptive.media.document.library.internal.repository.capabilities.BaseCapability$SafeFileVersion.getContentStream(BaseCapability.java:183)
              at com.liferay.adaptive.media.image.internal.scaler.AMDefaultImageScaler._getInputStream(AMDefaultImageScaler.java:84)
              ... 16 more
      2019-09-09 02:32:57.993 WARN  [liferay/document_library_raw_metadata_processor-1][RawMetadataProcessorMessageListener:38] Unable to save metadata for file version 37436
      com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37435
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15809)
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15827)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileEntry(DLFileEntryLocalServiceImpl.java:1256)
              at sun.reflect.GeneratedMethodAccessor522.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.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
              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:62)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy55.getFileEntry(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileEntry(DLFileEntryLocalServiceUtil.java:799)
              at com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl.getFileEntry(DLFileVersionImpl.java:116)
              at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFileEntry(LiferayFileVersion.java:154)
              at com.liferay.portal.kernel.repository.model.FileVersionWrapper.getFileEntry(FileVersionWrapper.java:119)
              at com.liferay.document.library.internal.repository.capabilities.LiferayProcessorCapability$SafeFileVersion.getFileEntry(LiferayProcessorCapability.java:211)
              at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl.saveMetadata(RawMetadataProcessorImpl.java:180)
              at com.liferay.document.library.kernel.util.RawMetadataProcessorUtil.saveMetadata(RawMetadataProcessorUtil.java:113)
              at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:34)
              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.SerialDestination$1.run(SerialDestination.java:58)
              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)
      2019-09-09 02:32:58.549 WARN  [liferay/adaptive_media_processor-3][AMMessageListener:81] com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37497
      com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37497
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:137)
              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.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37497
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15809)
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15827)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileEntry(DLFileEntryLocalServiceImpl.java:1256)
              at sun.reflect.GeneratedMethodAccessor522.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.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
              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:62)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy55.getFileEntry(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileEntry(DLFileEntryLocalServiceUtil.java:799)
              at com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl.getFileEntry(DLFileVersionImpl.java:116)
              at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFileEntry(LiferayFileVersion.java:154)
              at com.liferay.portal.kernel.repository.model.FileVersionWrapper.getFileEntry(FileVersionWrapper.java:119)
              at com.liferay.adaptive.media.document.library.internal.repository.capabilities.BaseCapability$SafeFileVersion.getFileEntry(BaseCapability.java:188)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:104)
              ... 12 more
      2019-09-09 02:32:59.515 WARN  [liferay/document_library_raw_metadata_processor-1][RawMetadataProcessorMessageListener:38] Unable to save metadata for file version 37634
      com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37633
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15809)
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15827)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileEntry(DLFileEntryLocalServiceImpl.java:1256)
              at sun.reflect.GeneratedMethodAccessor522.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.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
              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:62)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy55.getFileEntry(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileEntry(DLFileEntryLocalServiceUtil.java:799)
              at com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl.getFileEntry(DLFileVersionImpl.java:116)
              at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFileEntry(LiferayFileVersion.java:154)
              at com.liferay.portal.kernel.repository.model.FileVersionWrapper.getFileEntry(FileVersionWrapper.java:119)
              at com.liferay.document.library.internal.repository.capabilities.LiferayProcessorCapability$SafeFileVersion.getFileEntry(LiferayProcessorCapability.java:211)
              at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl.saveMetadata(RawMetadataProcessorImpl.java:180)
              at com.liferay.document.library.kernel.util.RawMetadataProcessorUtil.saveMetadata(RawMetadataProcessorUtil.java:113)
              at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:34)
              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.SerialDestination$1.run(SerialDestination.java:58)
              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)
      2019-09-09 02:32:59.533 WARN  [liferay/adaptive_media_processor-5][AMMessageListener:81] com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37633
      com.liferay.adaptive.media.exception.AMRuntimeException$IOException: com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37633
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:137)
              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.NoSuchFileEntryException: No DLFileEntry exists with the primary key 37633
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15809)
              at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryPersistenceImpl.findByPrimaryKey(DLFileEntryPersistenceImpl.java:15827)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileEntry(DLFileEntryLocalServiceImpl.java:1256)
              at sun.reflect.GeneratedMethodAccessor522.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.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
              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:62)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy55.getFileEntry(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileEntry(DLFileEntryLocalServiceUtil.java:799)
              at com.liferay.portlet.documentlibrary.model.impl.DLFileVersionImpl.getFileEntry(DLFileVersionImpl.java:116)
              at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFileEntry(LiferayFileVersion.java:154)
              at com.liferay.portal.kernel.repository.model.FileVersionWrapper.getFileEntry(FileVersionWrapper.java:119)
              at com.liferay.adaptive.media.document.library.internal.repository.capabilities.BaseCapability$SafeFileVersion.getFileEntry(BaseCapability.java:188)
              at com.liferay.adaptive.media.image.internal.processor.AMImageProcessorImpl.process(AMImageProcessorImpl.java:104)
              ... 12 more
      

      Attachments

        1. fragment-collection.zip
          1.08 MB
        2. fragment-collection-no-png.zip
          49 kB
        3. test.gif
          test.gif
          1022 kB

        Activity

          People

            jeremy.chen Jeremy Chen
            austin.chiang Austin Chiang
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 37 weeks, 3 days ago

              Packages

                Version Package
                7.2.10 DXP FP2
                7.2.10.1 DXP SP1
                7.2.1 CE GA2
                7.2.X
                7.3.10 DXP GA1
                Master