Myeclipse 8.6使用tomcat7时间。执行javaweb如报告了以下错误项:
java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:60)
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:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 1 more
据说原由于眼下的Myeclipse内核为Eclipse3.5.*不能直接支持tomcat7
解决的方法:
1、更换tomcat7为tomcat6
2、加入apache-tomcat-7.0.42/bin/tomcat-juli.jar那jar包来tomcat类路径,例如下面的附图: