分类: 系统运维
2011-08-21 19:20:43
公司用的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 严重: Error listenerStart 2011-8-21 18:56:28 org.apache.catalina.core.StandardContext start 严重: 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文件发现如下问题:
2011-8-21 18:59:38 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.OutOfMemoryError: Java heap space |
错误很明显,需要的就是增大相关jvm内存:
在bin目录下的catalina.bat中增加下面内容: set JAVA_OPTS=%JAVA_OPTS% -server -Xms512m -Xmx768m -XX:MaxNewSize=768m |