Reputation: 225
Trying to start tomcat7 and I get this error:
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$1.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
tnx
p.s: when i change tomcat 6 to 7 i give this error , my project worked before of this change!
Upvotes: 5
Views: 17563
Reputation: 151
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.
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
Upvotes: 0
Reputation: 634
This error is occuring due to missing tomcat-juli.jar in the Launch environment in Eclipse
I solved it by doing the below steps-
1.Double click on the installed Ode v1.x Server in the 'Server' View.
2.Click on Open launch configuration.
3.Choose Classpath tab > Add External JARs > [your TOMCAT_DIR]\bin\tomcat-juli.jar.
4.Click Apply then OK.
5.Start your Tomcat Server
Upvotes: 8
Reputation: 3831
try referencing the jar by a classpath entry,
currently it is not getting referenced and make sure you have tomcat correctly installed
Upvotes: 0
Reputation: 12890
Please check if your tomcat server has tomcat-juli.jar
in $TOMCAT_HOME/lib directory. Looks like it is the problem with tomcat server jar files. Please check your installation for correctness
Note : Please see the error
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.
It doesn't even get started. It couldn't find the main class itself
Upvotes: 2
Reputation: 69480
Looks like you miss the tomcat-juli.jar
in your classpath. Download and add it to your classpath.
Upvotes: 0