Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoClassDefFoundError: org/apache/juli/logging/LogFactory

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!

like image 351
SDWACW Avatar asked Jan 10 '23 21:01

SDWACW


2 Answers

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

like image 90
Sheshan Gamage Avatar answered Jan 15 '23 09:01

Sheshan Gamage


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

like image 42
Keerthivasan Avatar answered Jan 15 '23 08:01

Keerthivasan