剛剛建立一工程,我使用的工具是myeclipse8.5 + apache-tomcat-7.0.41,結果將工程部署後,啟動tomcat伺服器時,報如下的錯誤:
Exception in thread "main" 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:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 1 more
解決方案:
點擊myeclipse,選擇Preferentces->MyEclipse->Servers->Tomcat->Tomcat 6.x
,載入Tomcat7,在"Paths"下,點擊“Add JAR/ZIP”,載入tomcat7下的……/bin/tomcat-juli.jar。點擊“OK”.
如果是tomcat6對應的版本,就不需要收到添加,如果是tomcat 7 版本的,就需要手動添加
本文出自 “奮鬥的IT小北漂” 部落格,請務必保留此出處http://wuguojun.blog.51cto.com/2311759/1292234