主要发现的问题就两点
1)JDK的安装,才开始的时候看到网上教程说使用RPM包安装,然后去官网下载RPM安装包进行安装,将安装包拷贝到/usr目录下,使用 #rpm -ivh jdk-7-linux-x64.rpm命令安装,安装过程中出现了错误,百度说是因为没有执行权限,然后#chmod 777 jdk-7-linux-x64.rmp,依然错误,搜了N多方法,都不好弄,最后只能是使用tar包安装,直接解压tar文件,然后配置环境变量,坑又来了。。。。习惯性的使用分号作间隔,windows一直都是这样,结果执行#source /etc/profile 时,提示没有权限。。。坑,其实是因为Linux的配置文件是,必须使用冒号:,这个提示真够蛋疼的。。
JAVA_HOME=/usr/local/jdk1.6.0_21/ JRE_HOME=/usr/local/jdk1.6.0_21/jre/ PATH=$PATH:$JAVA_HOME/bin:$JRE_home/bin CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar export JAVA_HOME export JRE_HOME export PATH export CLASSPATH
2)Liferay的向导配置,直接部署tomcat绑定liferay的应用包发布到Linux系统中,打开浏览器访问8080,结果直接500错误,后台有一个
Java.lang.IndexOutOfBoundException错误感觉很坑,怀疑是配置文件的问题,就直接将windows下面向导配置文件 portal-setup-wizard.properties 文件中部分配置文件修改后直接COPY到linux下,结果还真就解决了数组越界的问题。
08:03:49,000 WARN [http-bio-8080-exec-2][code_jsp:128] {code="500", msg="", uri=/favicon.ico} javax.servlet.ServletException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:341) at com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:198) at com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:68) at com.liferay.portal.servlet.filters.absoluteredirects.AbsoluteRedirectsFilter.doFilterTry(AbsoluteRedirectsFilter.java:60) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:183) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) ... 26 more 一月 20, 2015 8:03:49 上午 org.apache.catalina.core.ApplicationDispatcher invoke 严重: Servlet.service() for servlet jsp threw exception java.lang.ArrayIndexOutOfBoundsException: 0 at com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:341) at com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:198) at com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:68) at com.liferay.portal.util.PortalImpl.getCompanyId(PortalImpl.java:1475) at com.liferay.portal.util.PortalImpl.getCompany(PortalImpl.java:1441) at com.liferay.portal.util.PortalImpl.getRelativeHomeURL(PortalImpl.java:4451) at com.liferay.portal.util.PortalImpl.getHomeURL(PortalImpl.java:2539) at com.liferay.portal.util.PortalUtil.getHomeURL(PortalUtil.java:682) at org.apache.jsp.errors.code_jsp._jspService(code_jsp.java:165) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:489) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:467) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:338) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:428) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:201) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)