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

Upgrade to version 6.1.0 from 6.0.6 fails if some images do not exist in image folder

    Details

      Description

      In the case some from the images in the image library is missing (in the case of previous failure the image has been deleted deleted or something else happened the image file just does not exist), then the upgrade fails and the database remains inconsistent, so the upgrade cannot be executed.
      The upgrade should be made so it does not fail completely, but just should not take over the concrete image or delete it or, replace with some standard "failed upgrade" picture with the same file name, log this event into the log and continue. Or, at least, if it fails from that reason, it should write down the list of all pictures missing, otherwise the recostruction of the image folder and file structure can become very very problematic - to figure out one missing picture one new run of upgrade is necessary, then again the DB restore, etc.
      Following errors are in the log in the case of such problem:

      14:41:57,921 INFO [DialectDetector:80] Determine dialect for PostgreSQL 9
      14:41:57,968 INFO [DialectDetector:145] Found dialect org.hibernate.dialect.PostgreSQLDialect
      14:42:29,640 INFO [BaseDB:406] Database supports case sensitive queries
      14:42:29,890 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.UpgradeProcess_6_1_0
      14:42:29,890 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeSchema
      14:42:33,000 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeUserName
      14:42:33,203 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeAdminPortlets
      14:42:33,390 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeBlogs
      14:42:33,718 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCamelCasePortletPreferences
      14:42:35,546 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCountry
      14:42:35,750 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeDocumentLibrary
      14:42:36,031 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeExpando
      14:42:36,046 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeGroup
      14:42:36,406 INFO [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery
      14:42:37,312 ERROR [MainServlet:198] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: C:\DEVELOP\Liferay_6.1.0\bin\data\images\10\42\10423.png
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: C:\DEVELOP\Liferay_6.1.0\bin\data\images\10\42\10423.png
      at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
      at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1267)
      at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:195)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: C:\DEVELOP\Liferay_6.1.0\bin\data\images\10\42\10423.png
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:211)
      at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:93)
      at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46)
      at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:81)
      at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:40)
      at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:119)
      at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
      at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
      ... 20 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.NoSuchFileException: C:\DEVELOP\Liferay_6.1.0\bin\data\images\10\42\10423.png
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:211)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:225)
      at com.liferay.portal.upgrade.UpgradeProcess_6_1_0.doUpgrade(UpgradeProcess_6_1_0.java:67)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
      ... 27 more
      Caused by: com.liferay.portlet.documentlibrary.NoSuchFileException: C:\DEVELOP\Liferay_6.1.0\bin\data\images\10\42\10423.png
      at com.liferay.portal.image.FileSystemHook.getImageAsStream(FileSystemHook.java:74)
      at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.migrateImage(UpgradeImageGallery.java:357)
      at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.migrateImageFiles(UpgradeImageGallery.java:398)
      at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.doUpgrade(UpgradeImageGallery.java:248)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
      ... 30 more

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              goodwin Artur Linhart (BC) (Inactive)
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 24 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2