今天,安装Tomcat7.0.21后,单独用D:apache-tomcat-7.0.21instartup.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.21in omcat-juli.jar就OK啦!