主要發現的問題就兩點 java
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的配置文件是,必須使用冒號:,這個提示真夠蛋疼的。。 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錯誤,後臺有一個 web
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)