I was running Tomcat 5.5.23 on centOS 5.5 then had to reinstall for some reason. After installation it will not start. Checking the catalina.out file resulted in this error. Googling for a few hours showed the result was to copy the missing jar file into a directory (/var/lib/tomcat5/server/lib) which solved the problem but however created another one; this time I'm getting the following error:
Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/SystemLogHandler
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
at java.lang.Class.getConstructor0(Class.java:2716)
at java.lang.Class.newInstance0(Class.java:343)
at java.lang.Class.newInstance(Class.java:325)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:225)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.log.SystemLogHandler
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:319)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
... 7 more
I have been Googling for hours to no end and I suspect this isn't a "copying jar files into a directory problem" but rather a set environment variable problem, but the problem is that I'm not sure where to set said variable. Although there is no CLASSPATH variable defined for the system, (I believe this gets created in the startup script) but everything in the tomcat5.conf is set correctly. Any help would be appreciated. The closest similar issue I found was by this guy on the Tomcat mailing list but as you can see it's a few years old.