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

DLProcessors can't get PWC file during unit test

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.0 CE RC1
    • Fix Version/s: --Sprint 12/11, 6.1.0 CE RC1
    • Component/s: DM
    • Labels:
      None

      Description

      The unit test runs through faster than asynchronous processor can process files this may result in the actual file not being available when the processor tries to access it. See

        [junit] 23:59:49,361 INFO  [WebDAVServlet:152] OSX: (testMSOffice1Create:52) PUT /webdav/guest/document_library/WebDAVTest/Test.docx 201
          [junit] 23:59:49,428 INFO  [WebDAVServlet:152] OSX: (testMSOffice1Create:56) LOCK /webdav/guest/document_library/WebDAVTest/Test.docx 200
          [junit] 23:59:49,451 ERROR [SerialDestination:104] Unable to process message {destinationName=liferay/document_library_raw_metadata_processor, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion@32b7bb55, values={principalPassword=null, principalName=10195, companyId=10153}}
          [junit] com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portlet.documentlibrary.NoSuchFileException: /Users/mika/Development/Liferay/portal-trunk-git/liferay/data/document_library/10153/35601/1982/PWC
          [junit] 	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:31)
          [junit] 	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
          [junit] 	at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
          [junit] 	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
          [junit] 	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
          [junit] 	at java.lang.Thread.run(Thread.java:680)
          [junit] Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: /Users/mika/Development/Liferay/portal-trunk-git/liferay/data/document_library/10153/35601/1982/PWC
          [junit] 	at com.liferay.portlet.documentlibrary.store.FileSystemStore.getFile(FileSystemStore.java:191)
          [junit] 	at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.getFile(StoreProxyImpl.java:124)
          [junit] 	at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.getFile(SafeFileNameStoreWrapper.java:183)
          [junit] 	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:227)
          [junit] 	at com.liferay.portlet.documentlibrary.store.DLStoreUtil.getFile(DLStoreUtil.java:347)
          [junit] 	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:573)
          [junit] 	at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
          [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
          [junit] 	at $Proxy181.getFile(Unknown Source)
          [junit] 	at com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil.getFile(DLFileEntryLocalServiceUtil.java:407)
          [junit] 	at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFile(LiferayFileVersion.java:94)
          [junit] 	at com.liferay.portlet.documentlibrary.util.RawMetadataProcessor.saveMetadata(RawMetadataProcessor.java:117)
          [junit] 	at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:33)
          [junit] 	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
          [junit] 	... 5 more
          [junit] 23:59:49,610 INFO  [WebDAVServlet:152] OSX: (testMSOffice1Create:57) UNLOCK /webdav/guest/document_library/WebDAVTest/Test.docx 204
          [junit] 23:59:49,684 INFO  [WebDAVServlet:152] OSX: (testMSOffice1Create:56) LOCK /webdav/guest/document_library/WebDAVTest/Test.docx 200
          [junit] 23:59:49,698 ERROR [SerialDestination:104] Unable to process message {destinationName=liferay/document_library_raw_metadata_processor, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion@7eed3c75, values={principalPassword=null, principalName=10195, companyId=10153}}
          [junit] com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portlet.documentlibrary.NoSuchFileException: /Users/mika/Development/Liferay/portal-trunk-git/liferay/data/document_library/10153/35601/1982/PWC
          [junit] 	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:31)
          [junit] 	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:65)
          [junit] 	at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:101)
          [junit] 	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
          [junit] 	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
          [junit] 	at java.lang.Thread.run(Thread.java:680)
          [junit] Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: /Users/mika/Development/Liferay/portal-trunk-git/liferay/data/document_library/10153/35601/1982/PWC
          [junit] 	at com.liferay.portlet.documentlibrary.store.FileSystemStore.getFile(FileSystemStore.java:191)
          [junit] 	at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.getFile(StoreProxyImpl.java:124)
          [junit] 	at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.getFile(SafeFileNameStoreWrapper.java:183)
          [junit] 	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:227)
          [junit] 	at com.liferay.portlet.documentlibrary.store.DLStoreUtil.getFile(DLStoreUtil.java:347)
          [junit] 	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:573)
          [junit] 	at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
          [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
          [junit] 	at $Proxy181.getFile(Unknown Source)
          [junit] 	at com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil.getFile(DLFileEntryLocalServiceUtil.java:407)
          [junit] 	at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFile(LiferayFileVersion.java:94)
          [junit] 	at com.liferay.portlet.documentlibrary.util.RawMetadataProcessor.saveMetadata(RawMetadataProcessor.java:117)
          [junit] 	at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:33)
          [junit] 	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
          [junit] 	... 5 more
          [junit] 23:59:49,839 INFO  [WebDAVServlet:152] OSX: (testMSOffice1Create:57) UNLOCK /webdav/guest/document_library/WebDAVTest/Test.docx 204
          [junit] 23:59:49,927 INFO  [WebDAVServlet:152] OSX: (testMSOffice1Create:56) LOCK /webdav/guest/document_library/WebDAVTest/Test.docx 200
      

      To fix is allow unit tests to run DLProcessors synchronously.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 46 weeks, 4 days ago

                Packages

                Version Package
                --Sprint 12/11
                6.1.0 CE RC1