我今天在启动在myeclipse中启动tomcat7.0.6时,报错:
java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 1 more
Exception in thread "main"
把我弄得郁闷得很,我以前在myeclipse7.0中使用tomcat6.0都没有报这个错.通过在网上搜索,
解决方法:
一、打开myeclipse,Preferentces->MyEclipse->Servers->Tomcat->Tomcat 6.x
,载入Tomcat7,在"Paths"下,点击“Add JAR/ZIP”,加载tomcat7下的……/bin/tomcat-juli.jar。点击“OK”.
总结:
如果tomcat6.0则不加tomcat-juli.jar的path,tomcat7.0.6、7.0.11则要像上述方法设置path.