Issue
- The server cannot be started due to the following error after installing DXP 7.4 on the JBoss EAP server:
ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /: java.lang.ArrayIndexOutOfBoundsException: 0
at java.util.concurrent.CopyOnWriteArrayList.get(CopyOnWriteArrayList.java:388)
at java.util.concurrent.CopyOnWriteArrayList.get(CopyOnWriteArrayList.java:397)
at com.liferay.portal.util.PortalInstances.getDefaultCompanyId(PortalInstances.java:223)
at com.liferay.portal.util.PortalImpl.getDefaultCompanyId(PortalImpl.java:2144)
at com.liferay.portal.kernel.util.PortalUtil.getDefaultCompanyId(PortalUtil.java:853)
at com.liferay.portal.servlet.filters.validhostname.ValidHostNameFilter.doFilterTry(ValidHostNameFilter.java:39)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:194)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
at com.liferay.shielded.container.internal.proxy.FilterWrapper.doFilter(FilterWrapper.java:79)
Environment
- Liferay DXP 7.4
- JBoss EAP server 7.4
- Mysql 8
- Windows10
Resolution
- Sometimes the standalone.conf.bat file in Windows has been configured incorrectly, which results in the error.
- When it comes to the Windows system, there are only a few minor changes:
Navigate to${JBOSS_HOME}/bin/standalone.conf.batfile in Windows and comment out the initial JAVA_OPTS assignment as demonstrated in the following line:rem set "JAVA_OPTS~=-Xms1G -Xmx1G -XX:MetaspaceSize~=96M -XX:MaxMetaspaceSize~=256m"
Add the following JAVA_OPTS assignment one line above the: JAVA_OPTS_SET line found at end of the file:set "JAVA_OPTS~=%JAVA_OPTS% -Dfile.encoding~=UTF-8 -Djava.net.preferIPv4Stack~=true -Djboss.as.management.blocking.timeout~=480 -Duser.timezone~=GMT -Xmx2048m -XX:MaxMetaspaceSize~=384m"
Additional Information
- After installing DXP, the JVM options can be further tuned for improved performance. Please see Tuning Liferay and Tuning Your JVM for more information.
-
Installing on JBoss EAP requires installing the DXP WAR, installing only osgi dependencies, configuring JBoss, and deploying DXP on JBoss: Installing DXP 7.4 on JBoss EAP server