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

Upgrade fails due to IllegalStateException: Store is not available

    Details

      Description

      Description:
      When trying to upgrade from 6.0 SP2 to master, and Amazon S3 store configured, the upgrade fails due to IllegalStateException: Store is not available.

      23:11:08,888 INFO  [main][UpgradeProcess:99] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_6_2_0 in 1165ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.IllegalStateException: Store is not available
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:93)
              at com.liferay.portal.upgrade.Pre7UpgradeProcess.upgrade(Pre7UpgradeProcess.java:42)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
              at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:171)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:153)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:99)
              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:498)
              at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.IllegalStateException: Store is not available
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:93)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:119)
              at com.liferay.portal.upgrade.UpgradeProcess_6_2_0.doUpgrade(UpgradeProcess_6_2_0.java:70)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:90)
              ... 13 more
      Caused by: java.lang.IllegalStateException: Store is not available
              at com.liferay.portlet.documentlibrary.store.StoreFactory.getStore(StoreFactory.java:125)
              at com.liferay.portlet.documentlibrary.store.DLStoreImpl.deleteDirectory(DLStoreImpl.java:202)
              at com.liferay.document.library.kernel.store.DLStoreUtil.deleteDirectory(DLStoreUtil.java:230)
              at com.liferay.portal.upgrade.v6_2_0.UpgradeDocumentLibrary.deleteChecksumDirectory(UpgradeDocumentLibrary.java:71)
              at com.liferay.portal.upgrade.v6_2_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:96)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:90)
              ... 16 more

      Steps to Reproduce:
      1. Start up 6.0 SP2 with the following portal-ext.properties

      image.hook.impl=com.liferay.portal.image.DLHook
      image.hook.file.system.root.dir=${liferay.home}/data/images
      
      dl.hook.impl=com.liferay.documentlibrary.util.S3Hook
      dl.hook.s3.access.key=AKIAIFKPL4CPQPWZRX5A
      dl.hook.s3.secret.key=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
      dl.hook.s3.bucket.name=support-lax
      
      jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
      jdbc.default.url=jdbc:jtds:sqlserver://192.168.5.155/dbname
      jdbc.default.username=sa
      jdbc.default.password=password
      
      setup.wizard.enabled=false
      terms.of.use.required=false

      2. Go to Control Panel > Image Gallery > Add Image
      3. Shut down portal
      4. For DXP bundle, add the attached com.liferay.portal.store.s3.configuration.S3StoreConfiguration.cfg file to osgi/configs
      5. Add attached system-ext.properties file to ROOT/WEB-INF/classes
      6. Add following portal-ext.properties

      image.hook.impl=com.liferay.portal.image.DLHook
      passwords.encryption.algorithm.legacy=SHA
      
      dl.store.impl=com.liferay.portal.store.s3.S3Store
      
      jdbc.default.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
      jdbc.default.url=jdbc:sqlserver://192.168.5.155;databaseName=dbname
      jdbc.default.username=sa
      jdbc.default.password=password
      
      setup.wizard.enabled=false
      terms.of.use.required=false
      index.read.only=true
      locales=ca_ES,zh_CN,nl_NL,en_US,fi_FI,fr_FR,de_DE,iw_IL,hu_HU,ja_JP,pt_BR,es_ES

      7. Add the following to portal-upgrade-database.properties in tools/portal-tools-db-upgrade-client

      dl.store.impl=com.liferay.portal.store.s3.S3Store
      jdbc.default.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
      jdbc.default.url=jdbc:sqlserver://192.168.5.155;databaseName=dbname
      jdbc.default.username=sa
      jdbc.default.password=password
      

      8. Run java -jar com.liferay.portal.tools.db.upgrade.client.jar
      Expected Behavior: Upgrade completes
      Actual Behavior: Upgrade fails due to IllegalStateException

      Testing:
      Reproduced in 7.0.x-private - 187a2cc022f8d0f32cac6eb0da5eb79251c4df46
      Can't test in master - 8a902f3aed4b50022e69497779c613ded25d2fed

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            samuel.ziemer Sam Ziemer
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 16 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP33
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                7.1.X
                Master