Tomcat version won't start
Just downloaded Tomcat 7.0.26, unpacked it, ran the file startup.bat
and failed 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
Recommended employee is recommended to use an older / more stable version of Tomcat. It works 6.0.35 so I decided to try this.
I did the same thing with 6.0.35 ... and the same thing happens to me ...
What's going on here?!?! I can see in bin/tomcat-juli.jar
that the LogFactory exists (both versions) ...
Edit
Here are the values ββfor several environment variables:
- CLASSPATH:
.;C:\Users\<myUser>\Desktop\jars\;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
- JAVA_HOME:
C:\Program Files\Java\jdk1.6.0_25
They 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 Java Home is set to jdk1.6.0_25
?
source to share
It is possible that you have an environment variable set on your system that prevents Tomcat from starting.
Check:
- CATALINA_HOME
- CATALINA_BASE
- CATALINA_OPTS (for adding classpath)
- JAVA_OPTS (for adding the classpath)
and less likely:
- LOGGING_CONFIG
- LOGGING_MANAGER
If any of these environment variables are set, correct or unset. I am assuming CATALINA_HOME
installed to point to a different version of Tomcat on your system.
source to share