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

UpgradeWikiAttachments causes com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException

    Details

      Description

      Wiki works well in Liferay 6.1.2-ga3, but when I try upgrade to 6.2.0-ga1, the process stops with:

      21:52:09,305 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_2_0.UpgradeWikiAttachments
      21:52:09,716 ERROR [localhost-startStop-1][MainServlet:209] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: /home/vega/Liferay/liferay-portal-6.2.0-ce-ga1/data/document_library/10117/0/wiki/24874/private_pages.jpg/private_pages_1.0.jpg
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: /home/vega/Liferay/liferay-portal-6.2.0-ce-ga1/data/document_library/10117/0/wiki/24874/private_pages.jpg/private_pages_1.0.jpg
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:74)
              at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1238)
              at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:206)
              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$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              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:724)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: /home/vega/Liferay/liferay-portal-6.2.0-ce-ga1/data/document_library/10117/0/wiki/24874/private_pages.jpg/private_pages_1.0.jpg
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:181)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:167)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:119)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:99)
              at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:138)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:61)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:143)
              at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:160)
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:68)
              ... 20 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: /home/vega/Liferay/liferay-portal-6.2.0-ce-ga1/data/document_library/10117/0/wiki/24874/private_pages.jpg/private_pages_1.0.jpg
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:181)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:195)
              at com.liferay.portal.upgrade.UpgradeProcess_6_2_0.doUpgrade(UpgradeProcess_6_2_0.java:90)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:178)
              ... 28 more
      Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: /home/vega/Liferay/liferay-portal-6.2.0-ce-ga1/data/document_library/10117/0/wiki/24874/private_pages.jpg/private_pages_1.0.jpg
              at com.liferay.portlet.documentlibrary.store.FileSystemStore.getFileSize(FileSystemStore.java:262)
              at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.getFileSize(StoreProxyImpl.java:207)
              at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.getFileSize(SafeFileNameStoreWrapper.java:322)
              at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFileSize(DLStoreImpl.java:321)
              at com.liferay.portlet.documentlibrary.store.DLStoreUtil.getFileSize(DLStoreUtil.java:489)
              at com.liferay.portal.kernel.upgrade.v6_2_0.BaseUpgradeAttachments.updateEntryAttachments(BaseUpgradeAttachments.java:479)
              at com.liferay.portal.upgrade.v6_2_0.UpgradeWikiAttachments.updateAttachments(UpgradeWikiAttachments.java:103)
              at com.liferay.portal.kernel.upgrade.v6_2_0.BaseUpgradeAttachments.doUpgrade(BaseUpgradeAttachments.java:316)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:178)
              ... 31 more
      Stopping the server due to unexpected startup errors
      

      I think the core of this problem is, that Wiki upgrade process is trying to find a versioned attachement, which does not exist in Wiki. The file private_pages.jpg however does exist:

      ~/Liferay > find . -name "*private_pages*"
      ./liferay-portal-6.2.0-ce-ga1/data/document_library/10117/0/wiki/24874/private_pages.jpg
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shitian.zhang Shitian "Shelton" Zhang (Inactive)
              Reporter:
              jeanvega Ján Ondrušek
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 14 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.1 CE GA2
                  6.2.X EE
                  7.0.0 M1