您好,欢迎来到年旅网。
搜索
您的当前位置:首页Java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory [duplicate]

Java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory [duplicate]

来源:年旅网

J

25
8

This question already has an answer here:

  •  5 answers

Seem to have a problem starting my Java app:

Tried the solution here: 

But I see tomcat-juli.jar already. Also I'm using Tomcat 7. What might be wrong?

marked as duplicate by  Mar 7 '16 at 21:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please .

 

7 Answers

15 accepted

Your vm does not find the class org/apache/juli/logging/LogFactory check if this class is present in the tomcat-juli.jar that you use (unzip it and search the file), if it's not present download the library from apache web site else if it's present put the tomcat-juli.jar in a path (the lib directory) that Tomcat use to load classes. If your Tomcat does not find it you can copy the jar in the lib directory of the JRE that you are using.

 
6

If you are using jsvc to run tomcat as tomcat (run /etc/init.d/tomcat as root), edit /etc/init.d/tomcat and add $CATALINA_HOME/bin/tomcat-juli.jar to CLASSPATH.

 
6

This happened to me because I was using a Tomcat 5.5 catalina.sh file with a Tomcat 7 installation. Using the catalina.sh that came with the Tomcat 7 install fixed the problem.

 
 
This is not an answer. This should have been in comments. –    Oct 6 '14 at 10:52
4  
@AdityaSingh This is an answer. it includes diagnosis of the problem and specification of a resolution. It happens to be succint - which in no way disqualifies it. –    Mar 8 '16 at 2:02 
5

I ran into this problem when using tomcat-embed-core::7.0.47, from Maven. I'm not sure why they didn't add tomcat-util as a runtime dependency, so I added my own runtime dependency to my own project.

<dependency>
  <groupId>org.apache.tomcat</groupId>
  <artifactId>tomcat-util</artifactId>
  <version><!-- version from tomcat-embed-core --></version>
  <scope>runtime</scope>
</dependency>
 
 
Helped a lot, using Spring Boot with a Servlet 3.0 compatible version of Tomcat. I had to add this, thanks! (Mine is at scope "provided" currently though). –    Nov 3 '16 at 19:42
2

I had the same problem, What helped me was:

Done .

 
1

In our case, the wrong version of the Sysdeo Tomcat plugin for Eclipse 3.5 was being used. The fix:

  • Use tomcatPluginV33 instead of tomcatPluginV321 (extract to C:\eclipse\dropins)
  • Ensure that DevloaderTomcat7.jar was placed in the tomcat lib folder
  • In Window > Preferences > Tomcat, set the Tomcat version to 7.x

This problem may have been unique to our environment; but, I'll record it here anyway, for posterity's sake.

 
0

On Ubuntu 14.04 LTS

/usr/share# mv /opt/tomcat/apache-tomcat-7.0.56/ tomcat7

fixed the issue for me. There was a symbolic link there to /opt. Inside that opt directory there where ../../java links that would not point to /usr/share/java since the files physically were in /opt

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- oldu.cn 版权所有 浙ICP备2024123271号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务