公司用的tomcat6.0.26,而家里的版本是6.0.18,程序部署過來之后啟動時顯示如下錯誤信息
信息: Not binding factory to JNDI, no JNDI name configured
2011-8-21 18:56:28 org.apache.catalina.core.StandardContext start
嚴(yán)重: Error listenerStart
2011-8-21 18:56:28 org.apache.catalina.core.StandardContext start
嚴(yán)重: Context [] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class
reloading, using NOPLoggerRepository.
2011-8-21 18:56:35 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080 |
第一個問題:log4j:ERROR這里,問題原因和解決方法如下:
The reason for the error is a new listener in Tomcat 6.0.24. You can fix this error by adding this line:
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
to the "conf/catalina.properties" file in your tomcat directory. |
第二個問題:Context [] startup failed due to previous errors,這里看不出具體的錯誤,查看tomcat的logs目錄下的localhost.xxxx-xx-xx.log文件發(fā)現(xiàn)如下問題:
2011-8-21 18:59:38 org.apache.catalina.core.StandardContext listenerStart
嚴(yán)重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.OutOfMemoryError: Java heap space |
錯誤很明顯,需要的就是增大相關(guān)jvm內(nèi)存:
在bin目錄下的catalina.bat中增加下面內(nèi)容:
set JAVA_OPTS=%JAVA_OPTS% -server -Xms512m -Xmx768m -XX:MaxNewSize=768m |
|