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

  • Post author:
  • Post category:java


出现错误如图:

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中

进行测试,一切正常啦:



版权声明:本文为lissdy原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。