Liferay 6.2 with JBoss 7.2 on CentOS 6.5 startup error
After struggling with the installation of JBoss 7.2 & Liferay (war file) on CentOS 6.5 (IP: 10.0.0.100), I tested Liferay's installation wizard with the url http://10.0.0.100:8080 and is welcomed with a lengthy exception report:
JBWEB000309: type JBWEB000066: Exception report
JBWEB000068: message java.lang.ArrayIndexOutOfBoundsException: 0
JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.
JBWEB000070: exception
javax.servlet.ServletException: java.lang.ArrayIndexOutOfBoundsException: 0
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
JBWEB000071: root cause
java.lang.ArrayIndexOutOfBoundsException: 0
com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:341)
com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:198)
com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:68)
com.liferay.portal.servlet.filters.absoluteredirects.AbsoluteRedirectsFilter.doFilterTry(AbsoluteRedirectsFilter.java:60)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:183)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
Don't have much experience with Java, it looked terrible for me. At last, after several hours going round and round on Google, I got a hint that I should put my hostname into /etc/hosts
1. Check current hostname
$hostname
2. Put hostname in /etc/hosts
127.0.0.1 centos6.gppm
Now, when I access http://10.0.0.100:8080/ it shows me a beautiful Liferay installation wizards :).
Can someone tell me why the change to hostname resolved that scary exception report?