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

UnsupportedOperationException when upgrading 6.1 GA3 > 6.2 with documents stored on JCR through DDL

    Details

      Description

      Reproduction steps:
      1) In a 6.1 portal Set dl.store.impl=com.liferay.portlet.documentlibrary.store.JCRStore in portal-ext.properties
      2) Start the portal, add a Data Definition having a field for File Upload
      3) Add a Dynamic Data List with such Data Definition and a Record with 1 uploaded file, assert the file displays well
      4) Shut down the portal
      5) Upgrade to 6.2 EE portal-107 having the same DB and portal-ext.properties, make sure to add passwords.encryption.algorithm.legacy=SHA, start the upgrade
      6) During upgrade, the below will appear in the logs:

      11:07:58,326 WARN  [localhost-startStop-1][VerifyDynamicDataMapping:164] Unable to add file entry Flag_of_Faroe_Islands.png
      java.lang.UnsupportedOperationException
      	at com.liferay.portlet.documentlibrary.store.BaseStore.getFile(BaseStore.java:291)
      	at com.liferay.portlet.documentlibrary.store.BaseStore.getFile(BaseStore.java:257)
      	at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.getFile(StoreProxyImpl.java:124)
      	at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.getFile(SafeFileNameStoreWrapper.java:196)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:246)
      	at com.liferay.portlet.documentlibrary.store.DLStoreUtil.getFile(DLStoreUtil.java:326)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.addFileEntry(VerifyDynamicDataMapping.java:149)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateFileUploadReferences(VerifyDynamicDataMapping.java:594)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateDDLFileUploadReferences(VerifyDynamicDataMapping.java:484)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateFileUploadReferences(VerifyDynamicDataMapping.java:557)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateFileUploadReferences(VerifyDynamicDataMapping.java:538)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.verifyStructure(VerifyDynamicDataMapping.java:739)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.doVerify(VerifyDynamicDataMapping.java:301)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:68)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:76)
      	at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:44)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:68)
      	at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:111)
      	at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:76)
      	at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:46)
      	at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:146)
      	at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:67)
      	at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:240)
      	at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:239)
      	at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:77)
      	at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1257)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:231)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      

      Portal will start up

      7) Login with Admin user, check the previously created DDL record

      Expected: The file to be present
      Actual behavior The uploaded file disappeared

        Attachments

          Activity

            People

            • Assignee:
              lori.liu Lori Liu (Inactive)
              Reporter:
              laszlo.hudak Laszlo Hudak
              Participants of an Issue:
              Recent user:
              Lori Liu (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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

                Packages

                Version Package