Reputation: 56904
Just downloaded Tomcat 7.0.26, unzipped it, ran the startup.bat
file and it failed with the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.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
A co-worker recommended I try using an older/more stable version of Tomcat. He's running 6.0.35, so I decided to try that.
I did the same exact thing with 6.0.35...and the same thing is happening to me...
What is going on here?!?! I see in bin/tomcat-juli.jar
that the LogFactory is there (both versions)...
Edit:
Here are the values for several environment variables:
.;C:\Users\<myUser>\Desktop\jars\;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
C:\Program Files\Java\jdk1.6.0_25
These don't seem to add up!?! If I'm reading this correctly, doesn't it say that the CLASSPATH thinks I'm using jre6
, but that Java Home is set to jdk1.6.0_25
?
Upvotes: 0
Views: 3184
Reputation: 1399
I had same problem. All I did was to copy all the jar files in [apache-tomcat]/lib directory and all the jar files in [apache-tomcat]/bin to [jdk directory]/jre/lib/ext directory. This should solved the problem.
Upvotes: 0
Reputation: 23248
It's possible that some environment variable is set in your system which is preventing Tomcat from running.
Check:
and less likely:
If any of these environment variables are set, correct or unset them. My guess is that CATALINA_HOME
is set to point to a different version of Tomcat on your system.
Upvotes: 1
Reputation: 12453
I have downloaded Tomcat 7.0.26 2 hours ago and its working fine. It looks like you have an old version of commons-logging.jar anywhere in your classpath (path variable, jre versions/lib, etc...).
Upvotes: 1