Tomcat沒法啓動,報錯java.lang.NoClassDefFoundError: or...

今天使用Tomcat 7 時,發現Tomcat沒法啓動,

報錯java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory 

覺得是tomcat lib下缺失那個jar,經在http://grepcode.com查詢,是tomcat-juli.jar java

下載後,放在tomcat lib下,但是問題依舊。 apache

經google後,發現解決方案: tomcat

Solutions

1. In Eclipse, Open the 「Server」 tab.
2. Double click on the 「Tomcat6″ entry to see the configuration.
3. Then click on the 「Open launch configuration」 link in the 「General information」 block.
4. In the dialog, select the 「Classpath」 tab.
5. Click the 「Add external jar」 button.
6. Select the file 「/usr/share/tomcat6/bin/tomcat-juli.jar」
7. Close the dialog.
8. Start tomcat 6 from Eclipse.
google

原來這個tomcat-juli.jar文件在tomcat的bin目錄中。

也就是把tomcat-juli.jar加在Servers->tomcat 6->paths中 spa

從新啓動tomcat,問題解決。 code

相關文章
相關標籤/搜索