Tomcat7异常 java.lang.NoClassDefFoundError

下载下来tomcat7.0,解压后,使用时,MyEclipse控制台报异常:

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:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more
Exception in thread "main"

解决办法:

window---Myeclipse Enterprise workbench----Servers---tomcat---paths

Prepend to classpath:
点击Add JAR/ZIP 选择tomcat路径bin目录下的tomcat-juli.jar

确定,重启tomcat,OK。

你可能感兴趣的:(java,apache,tomcat,.net,MyEclipse)