Eclipse+Tomcat配置错误:java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory

出现错误如图:

java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
	at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)
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

解决方法:

点击windows→Perferences

如图,将tomcat  bin目录下的tomcat-juli.jar文件加入到tomcat  运行的classpath中

进行测试,一切正常啦:

Eclipse+Tomcat配置错误:java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory_第1张图片

你可能感兴趣的:(eclipse,tomcat,windows,测试)