java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory [英] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
问题描述
我实际上已经解决了这个问题,但我花了几天时间,所以我想我会把我的解决方案贴在这里以帮助其他人.
我使用的是 Fedora 11,在 Eclipse 中我尝试添加一个 Tomcat 6 服务器并启动它.我会收到以下错误:
<块引用>'Starting Tomcat v6.0 Server at localhost'遇到问题.
Server Tomcat v6.0 Server at localhost 启动失败.
然后在我的控制台中我得到以下信息:
线程main"中的异常java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory在 org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)引起:java.lang.ClassNotFoundException:org.apache.juli.logging.LogFactory在 java.net.URLClassLoader$1.run(URLClassLoader.java:217)在 java.security.AccessController.doPrivileged(Native Method)在 java.net.URLClassLoader.findClass(URLClassLoader.java:205)在 java.lang.ClassLoader.loadClass(ClassLoader.java:323)在 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)在 java.lang.ClassLoader.loadClass(ClassLoader.java:268)在 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)... 1个找不到主类:org.apache.catalina.startup.Bootstrap.程序将会退出.
我将在下面的答案中发布解决方案.
我在这里找到了解决方案:http://forums.opensuse.org/applications/391114-tomcat6-eclipse-not-working.html
<块引用>- 在 Eclipse 中,打开服务器"选项卡.
- 双击Tomcat6"条目以查看配置.
- 然后点击一般信息"块中的打开启动配置"链接.
- 在对话框中,选择类路径"选项卡.
- 点击添加外部 jar"按钮.
- 选择文件/usr/share/tomcat6/bin/tomcat-juli.jar"
- 关闭对话框.
- 从 Eclipse 启动 tomcat 6.
希望把它贴在这里能帮助一些可怜的人.
I have actually figured this problem out, but it took me days, so I thought I would paste my solution here to aide others.
I am using Fedora 11, and in Eclipse I tried adding a Tomcat 6 server and starting it. I would get the following error:
'Starting Tomcat v6.0 Server at localhost' has encountered a problem.
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.
I found the solution here: http://forums.opensuse.org/applications/391114-tomcat6-eclipse-not-working.html
- 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屋!