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

DXP upgrade: paths finishing with / don't work and upgrade tool set liferay.home as ../../ by default

    Details

    • Fix Priority:
      2

      Description

      Reproduction steps:
      1) Unzip a DXP bundle
      2) Go to liferay-dxp-digital-enterprise-7.0-ga1\tools\portal-tools-db-upgrade-client\
      3) Edit portal-upgrade-ext.properties
      Remove hashtag (#)
      4) Edit app-server.properties
      Remove hashtags (#) from Tomcat
      5) Start upgrade

      Other:
      If you add an extra slash at the end of the path, then it will fail with the same exception:
      liferay.home=c:/Liferay/Liferay/temp/DXP/liferay-dxp-digital-enterprise-7.0-ga1/

      Exception:

      java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:238)
      	at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:183)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:101)
      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      	at java.util.ArrayList.get(ArrayList.java:429)
      	at com.liferay.portal.bootstrap.ModuleFrameworkImpl.initFramework(ModuleFrameworkImpl.java:269)
      	at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.initFramework(ModuleFrameworkUtilAdapter.java:63)
      	at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:201)
      	... 2 more

      Notes:
      It can be also reproduced if you set the property liferay.home=../../ and startup the portal. Taking this into account there are two options:

      1- The portal should read filesystem urls finishing with "/" (this could be a problem with Windows system)

      2- The portal shouldn't read those kind of urls so we should need to change the default property value in the upgrade tool (it works with liferay.home=../..)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alberto.chaparro Alberto Chaparro
              Reporter:
              tibor.jandi Tibor Jandi
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 8 weeks ago

                  Packages

                  Version Package