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

IndexOutOfBoundsException when liferay.home ends with a slash

    Details

      Description

      Issues:
      When liferay.home property ends with a slash, IndexOutOfBoundsException could occur. Thus, relative path ../ does not work.

      Steps to reproduce:

      1. Set liferay.home ending with a slash.
      2. Run DB upgrade client or unit tests.

      Actual results:
      IndexOutOfBoundsException appears:

      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
      

      Expected results:
      No errors.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shitian.zhang Shitian "Shelton" Zhang (Inactive)
                Reporter:
                shitian.zhang Shitian "Shelton" Zhang (Inactive)
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 3 weeks ago

                  Packages

                  Version Package
                  7.0.0 DXP FP9
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  Master