java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory [英] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory

查看:49
本文介绍了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

<块引用>

  1. 在 Eclipse 中,打开服务器"选项卡.
  2. 双击Tomcat6"条目以查看配置.
  3. 然后点击一般信息"块中的打开启动配置"链接.
  4. 在对话框中,选择类路径"选项卡.
  5. 点击添加外部 jar"按钮.
  6. 选择文件/usr/share/tomcat6/bin/tomcat-juli.jar"
  7. 关闭对话框.
  8. 从 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

  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.

Hopefully posting it here will help some poor soul.

这篇关于java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆