tomcat启不起来了!
linux 下配置的jdk1.5+tomcat5.0.x的系统,安装完成后在启动TOMCAT时,不能启起来,查看日志内容为下:
2007-8-6 16:50:09 org.apache.coyote.http11.Http11Protocol init
ÐÅÏ¢: Initializing Coyote HTTP/1.1 on http-8181
2007-8-6 16:50:09 org.apache.catalina.startup.Catalina load
ÐÅÏ¢: Initialization processed in 1002 ms
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.naming.NamingContext. <clinit> (NamingContext.java:57)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:207)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:676)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
... 6 more
最开始以为是我的WEB应用里的包没拷过去,结果在WEB-INF/lib下已经有commons-logging-1.0.3.jar文件了。未防止以外,还是把路径+在了CLASS_PATH里面。但还是不行。
然后看了下Catalina.sh脚本里有:
CLASSPATH= "$CLASSPATH ": "$CATALINA_HOME "/bin/bootstrap.jar: "$CATALINA_HOME "/bin/commons-logging-api.jar
又检查了$CATALINA_HOME 变量,设置正确!并且commons-logging-api.jar也在路径内!
最后考虑到配置文件,把最初的配置文件拷过来,还是一样!
昏了!望解决
------解决方案--------------------重装!
------解决方案--------------------中毒了吧,要不看看环境变量培植对了没