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

Document File does not get migrated properly when upgrading a sharded environment to 7.0 DXP

    Details

    • Fix Priority:
      5

      Description

      Steps to reproduce:
      1. Configure a sharded environment with 3 shards. Add a basic document file to one of the shards. Steps to do this can be found here.

      I used the following properties:

      jdbc.default.driverClassName=com.mysql.jdbc.Driver
      jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.default.username=
      jdbc.default.password=
      
      jdbc.one.driverClassName=com.mysql.jdbc.Driver
      jdbc.one.url=jdbc:mysql://localhost/lportal1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.one.username=
      jdbc.one.password=
      
      jdbc.two.driverClassName=com.mysql.jdbc.Driver
      jdbc.two.url=jdbc:mysql://localhost/lportal2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.two.username=
      jdbc.two.password=
      
      spring.configs=\
              META-INF/base-spring.xml,\
              \
              META-INF/hibernate-spring.xml,\
              META-INF/infrastructure-spring.xml,\
              META-INF/management-spring.xml,\
              \
              META-INF/util-spring.xml,\
              \
              META-INF/jpa-spring.xml,\
              \
              META-INF/executor-spring.xml,\
              \
              META-INF/audit-spring.xml,\
              META-INF/cluster-spring.xml,\
              META-INF/editor-spring.xml,\
              META-INF/jcr-spring.xml,\
              META-INF/ldap-spring.xml,\
              META-INF/messaging-core-spring.xml,\
              META-INF/messaging-misc-spring.xml,\
              META-INF/mobile-device-spring.xml,\
              META-INF/notifications-spring.xml,\
              META-INF/poller-spring.xml,\
              META-INF/rules-spring.xml,\
              META-INF/scheduler-spring.xml,\
              META-INF/search-spring.xml,\
              META-INF/workflow-spring.xml,\
              \
              META-INF/counter-spring.xml,\
              META-INF/mail-spring.xml,\
              META-INF/portal-spring.xml,\
              META-INF/portlet-container-spring.xml,\
              META-INF/staging-spring.xml,\
              META-INF/virtual-layouts-spring.xml,\
              \
              META-INF/monitoring-spring.xml,\
              \
              #META-INF/dynamic-data-source-spring.xml,\
              META-INF/shard-data-source-spring.xml,\
              #META-INF/memcached-spring.xml,\
              \
      
      shard.default.name=default
      shard.available.names=default,one,two
      shard.selector=com.liferay.portal.dao.shard.ManualShardSelector
      

      A link to my dump can be found here

      2. Upgrade each shard to 7.0 (assert no errors appear during the upgrade process)
      3. Start up a separate bundle with each database

      Expected result:
      No errors appear when the bundle starts up.

      Actual result:
      The following error appears:

      22:50:58,226 WARN  [liferay/document_library_image_processor-1][BaseProcessorMessageListener:40] Unable to process file version 22054
      com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=21326, repositoryId=21352, fileName=1, cause=java.io.FileNotFoundException: D:\private\ee-7.0.x-bundles\data\document_library\21326\21352\1\1.0 (The system cannot find the path specified)}
              at com.liferay.portal.store.file.system.FileSystemStore.getFileAsStream(FileSystemStore.java:281)
              at com.liferay.portal.store.safe.file.name.wrapper.SafeFileNameStoreWrapper$SafeFileNameStore.getFileAsStream(SafeFileNameStoreWrapper.java:290)
              at com.liferay.document.library.store.IgnoreDuplicatesStore.getFileAsStream(IgnoreDuplicatesStore.java:196)
              at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFileAsStream(DLStoreImpl.java:303)
              at com.liferay.document.library.kernel.store.DLStoreUtil.getFileAsStream(DLStoreUtil.java:407)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1163)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFileAsStream(DLFileEntryLocalServiceImpl.java:1146)
              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:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy95.getFileAsStream(Unknown Source)
              at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileAsStream(DLFileEntryLocalServiceUtil.java:521)
              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.portlet.documentlibrary.util.ImageProcessorImpl._generateImages(ImageProcessorImpl.java:286)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl.generateImages(ImageProcessorImpl.java:83)
              at com.liferay.document.library.kernel.util.ImageProcessorUtil.generateImages(ImageProcessorUtil.java:53)
              at com.liferay.portlet.documentlibrary.messaging.ImageProcessorMessageListener.generate(ImageProcessorMessageListener.java:31)
              at com.liferay.portlet.documentlibrary.messaging.BaseProcessorMessageListener.doReceive(BaseProcessorMessageListener.java:36)
              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:756)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.FileNotFoundException: D:\private\ee-7.0.x-bundles\data\document_library\21326\21352\1\1.0 (The system cannot find the path 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)
      

      In the shard containing the document file, if Portal is opened and the user navigates to the document, a system error appears when the entry is downloaded.

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6.
      Portal 6.2 EE -> Portal ee-7.0.x GIT ID: 8061cb9fa8795f59a55c1027fe2880474f6e50c2

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              austin.chiang Austin Chiang
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 9 weeks, 5 days ago

                Packages

                Version Package