eclipse NoClassDefFoundError: org/apache/juli/logging/LogFactory
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25717754/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
NoClassDefFoundError: org/apache/juli/logging/LogFactory
提问by SDWACW
Trying to start tomcat7 and I get this error:
尝试启动 tomcat7 时出现此错误:
Buildfile: E:\Workspace\test\config\deploy\build.xml
tomcat.start:
[java] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
[java] at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:60)
[java] Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
[java] at java.net.URLClassLoader.run(Unknown Source)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] ... 1 more
[java] Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.
[java] Exception in thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 923 milliseconds
i use this link: [ https://stackoverflow.com/questions/7955442/java-lang-noclassdeffounderror-org-apache-juli-logging-logfactory?lq=1] and copy "tomcat-juli.jar" in my JRE and ... , but doesn't work
我使用此链接:[ https://stackoverflow.com/questions/7955442/java-lang-noclassdeffounderror-org-apache-juli-logging-logfactory?lq=1] 并在我的 JRE 中复制“tomcat-juli.jar”和 ... ,但不起作用
tnx
tnx
p.s: when i change tomcat 6 to 7 i give this error , my project worked before of this change!
ps:当我将 tomcat 6 更改为 7 时,出现此错误,我的项目在此更改之前工作!
回答by Sheshan Gamage
This error is occuring due to missing tomcat-juli.jar in the Launch environment in Eclipse
出现此错误是由于 Eclipse 的 Launch 环境中缺少 tomcat-juli.jar
I solved it by doing the below steps-
我通过执行以下步骤解决了它-
1.Double click on the installed Ode v1.x Server in the 'Server' View.
1.在“服务器”视图中双击已安装的 Ode v1.x 服务器。
2.Click on Open launch configuration.
2.单击打开启动配置。
3.Choose Classpath tab > Add External JARs > [your TOMCAT_DIR]\bin\tomcat-juli.jar.
3. 选择 Classpath 选项卡 > 添加外部 JAR > [您的 TOMCAT_DIR]\bin\tomcat-juli.jar。
4.Click Apply then OK.
4. 单击应用然后确定。
5.Start your Tomcat Server
5.启动你的Tomcat服务器
回答by Keerthivasan
Please check if your tomcat server has tomcat-juli.jar
in $TOMCAT_HOME/libdirectory. Looks like it is the problem with tomcat server jar files. Please check your installation for correctness
请检查您的 tomcat 服务器是否tomcat-juli.jar
在$TOMCAT_HOME/lib目录中。看起来是tomcat服务器jar文件的问题。请检查您的安装是否正确
Note : Please see the error
注意:请查看错误
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.
找不到主类:org.apache.catalina.startup.Bootstrap。程序将会退出。
It doesn't even get started. It couldn't find the main class itself
它甚至没有开始。它找不到主类本身
回答by Jens
Looks like you miss the tomcat-juli.jar
in your classpath. Download and add it to your classpath.
看起来您错过了tomcat-juli.jar
类路径中的 。下载并将其添加到您的类路径中。
回答by Vihar
try referencing the jar by a classpath entry,
尝试通过类路径条目引用 jar,
currently it is not getting referenced and make sure you have tomcat correctly installed
目前它没有被引用并确保你已经正确安装了 tomcat
回答by user3652083
I'm starting Tomcat with a Windows Batchfile. The problem occurred with Tomcat 7 + 8 + 8.5. You have to add bootstrap.jar and tomcat-juli.jar to your classpath.
我正在使用 Windows 批处理文件启动 Tomcat。问题出现在 Tomcat 7 + 8 + 8.5 上。您必须将 bootstrap.jar 和 tomcat-juli.jar 添加到您的类路径中。
Solution in my Batchfile:
我的批处理文件中的解决方案:
@echo off
SET TOMCAT_OPTS=-cp bootstrap.jar;tomcat-juli.jar
REM Go to your tomcat/bin directory
cd tomcat/bin
catalina.bat start