0

I've completed a fresh install of Tomcat6 on an OS X box that didn't have it before. It's behaved a bit strangely in other ways, but the current hang-up is that it won't start at all. In response to running startup.sh, the catalina.out log collects this error:

Exception in thread "main" java.lang.NoClassDefFoundError:  org/apache/catalina/startup/Bootstrap
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Other bits of strangeness noticed with this installation:

  • the .sh scripts in the bin directory had no execute permission, and had to be manually chmodded.
  • The log folder wasn't created, causing an earlier script crash. After I manually created the log folder, the startup script made it to this new error before failing.
  • Running other scripts in the bin folder generates similar error messages involving NoClassDefFoundError.
  • Bootstrap.java is indeed in the right place, though Bootstrap.class isn't in the same folder. For that matter, if any of the myriad class files for tomcat should have already been generated from their .java files, I haven't seen it.
1
  • Not setting execute bit is often caused by incomplete installation. I would check 3 things: java -version from the same shell you start Tomcat. This confirms that you a really running java you believe you are running. Second, try echo $CLASSPATH echo $JAVA_HOME echo $TOMCAT_HOME Third, check if there is not by any chance some forgotten jar file in JRE lib/ext directory that would load and cause troubles These three things helped me many times with Tomcat and Java based apps before
    – Miro A.
    Jul 17, 2010 at 23:56

2 Answers 2

1

what version of java are you running on your machine? from first look at this command i would say it looks like you could possibly be running java1.5 and this version of tomcat needs java1.6 seen this happening a couple of times.

3
  • Good thought, but I'm running Java 1.6.
    – baudot
    Jun 15, 2010 at 15:59
  • only other thing which i can think of is that your missing the path to some of the library files needed for starting tomcat up
    – Paul
    Jun 15, 2010 at 16:20
  • Seems like it was something in the ant build process. I've reinstalled from the core binaries rather than building from source, and that worked on the second try. (I still had to set the bin directory scripts to executable, manually.)
    – baudot
    Jun 15, 2010 at 22:07
0

I never did find out what it was, but installing from precompiled binaries rather than ant building from scratch fixed it.

You must log in to answer this question.