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>(
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
    at Method)         
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(       
    at java.lang.ClassLoader.loadClass(        
    at java.lang.ClassLoader.loadClassInternal(
    ... 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) ...


Here are the values ​​for several environment variables:

  • CLASSPATH: .;C:\Users\<myUser>\Desktop\jars\;C:\Program Files\Java\jre6\lib\ext\

  • 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

3 answers

It is possible that you have an environment variable set on your system that prevents Tomcat from starting.


  • CATALINA_OPTS (for adding classpath)
  • JAVA_OPTS (for adding the classpath)

and less likely:


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.



I downloaded Tomcat 7.0.26 2 hours ago and it works fine. It looks like you have an old version of commons-logging.jar anywhere in your classpath (path variable, jre versions / lib, etc.).



I had the same problem. All I did was copy all the jar files to the [apache-tomcat] / lib directory and all the jar files in [apache-tomcat] / bin to the [jdk directory] / jre / lib / ext directory. This should fix the problem.



All Articles