MyEclipse8.5集成Tomcat7时的启动错误:Exception in thread “main” java.lang.NoClassDefFoundError org/apache/commons/logging/LogFactory

今天,安装Tomcat7.0.21后,单独用D:\apache-tomcat-7.0.21\bin\startup.bat启动web服务正常。但 在MyEclipse8.5中集成配置Tomcat7后,在MyEclipse启动Tomcat服务则出现如下错误提示: 
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.(Bootstrap.java:54) 
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory 
at java.net.URLClassLoader$1.run(URLClassLoader.java:217) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:205) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:323) 
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:268) 
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) 
… 1 more 
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit. 
二、解决办法: 

过如下操作,问题解
决:MyEclipse->Window->Preferences->MyEclipse->Servers->Tomcat->Tomcat
6.x->Laucch->Create Launch
Configuration->Classpath->Bootstrap Entities->Add External
JARs->选择并填加D:\apache-tomcat-7.0.21\bin\tomcat-juli.jar就OK啦!

上一篇:linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.


下一篇:用户home目录下的.gitconfig 和 库文件夹目录下的 .gitignore 示例