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啦!

你可能感兴趣的:(MyEclipse8.5集成Tomcat7时的启动错误:Exception in thread “main” java.lang.NoClassDefFoundError org/apache/commons/logging/LogFactory)