java.lang.NoClassDefFoundError:org / apache / juli / logging / LogFactory [英] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
问题描述
我实际上已经把这个问题搞清了,但是花了我几天时间,所以我以为我会把我的解决方案粘贴到别人旁边。
I have actually figured this problem out, but it took me days, so I thought I would paste my solution here to aide others.
我使用的是Fedora 11 ,在Eclipse中,我尝试添加一个Tomcat 6服务器并启动它。我会收到以下错误:
I am using Fedora 11, and in Eclipse I tried adding a Tomcat 6 server and starting it. I would get the following error:
'启动Tomcat v6.0服务器在本地主机'遇到问题。
'Starting Tomcat v6.0 Server at localhost' has encountered a problem.
服务器Tomcat v6.0服务器在localhost无法启动。
Server Tomcat v6.0 Server at localhost failed to start.
然后在我的控制台我得到以下内容:
Then in my console I got the following:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
... 1 more
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.
我将在下面的答案中发布解决方案。
I'll post the solution in an answer below.
推荐答案
我在这里找到解决方案: http://forums.opensuse.org/applications/391114-tomcat6-eclipse-not-working.html
I found the solution here: http://forums.opensuse.org/applications/391114-tomcat6-eclipse-not-working.html
- 在Eclipse中,打开服务器选项卡。
- 双击Tomcat6条目查看配置。 >
- 然后单击常规信息块中的打开启动配置链接。
- 在对话框中,选择类路径选项卡。 li>
- 点击添加外部jar按钮。
- 选择文件/usr/share/tomcat6/bin/tomcat-juli.jar\"
- 关闭对话框
- 从Eclipse启动tomcat 6
- In Eclipse, Open the "Server" tab.
- Double click on the "Tomcat6" entry to see the configuration.
- Then click on the "Open launch configuration" link in the "General information" block.
- In the dialog, select the "Classpath" tab.
- Click the "Add external jar" button.
- Select the file "/usr/share/tomcat6/bin/tomcat-juli.jar"
- Close the dialog.
- Start tomcat 6 from Eclipse.
希望在这里张贴,将有助于一些可怜的灵魂。
Hopefully posting it here will help some poor soul.
这篇关于java.lang.NoClassDefFoundError:org / apache / juli / logging / LogFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!