9

I installed Tomcat on my Windows server but I can't get it to start. I start the service and I see the progress bar, but it fails.

I installed the Java Runtime Environment Version 6 and created JRE_HOME Environment variable. (C:\Program Files\Java\jre6)

Below is the jakarta_serviceYYYMMDD.log entries:

[2010-04-08 14:22:42] [info] Commons Daemon procrun (1.0.2.0) started
[2010-04-08 14:22:42] [info] Running Service...
[2010-04-08 14:22:42] [info] Starting service...
[2010-04-08 14:22:42] [info] Error occurred during initialization of VM
[2010-04-08 14:22:42] [info] java/lang/NoClassDefFoundError
[2010-04-08 14:22:42] [info] : java/lang/Object

How can I fix this problem?

Wesley
  • 32,320
  • 9
  • 80
  • 116
James Lawruk
  • 617
  • 2
  • 9
  • 18

5 Answers5

6

By the look of the error the Tomcat native launcher does not find the rt.jar file in your JRE install.

Make sure that:

  • the JVM is correctly installed;
  • the JRE_HOME variable points to it.
Robert Munteanu
  • 1,542
  • 5
  • 22
  • 38
  • Yep. The rt.jar file was missing for some reason. Uninstalled and reinstalled the JRE and now Tomcat works. Thanks! – James Lawruk Apr 09 '10 at 13:44
6

I had the same error with Windows 7, Tomcat 7.0, and JDK 1.6.0_31. I fixed it by changing the path to the JVM from C:\Program Files\Java\jre6\bin\server\jvm.dll to C:\Program Files\Java\jdk1.6.0_31\jre\bin\server\jvm.dll. To do that, run Tomcat7w.exe from the Tomcat bin directory, switch to the Java tab, and change the Java Virtual Machine entry.

Wesley
  • 32,320
  • 9
  • 80
  • 116
Kevin Condon
  • 161
  • 1
  • 2
2

I also got the same problem. rt.jar file was missing from ../JRE/lib. I copied the rt.jar file from JDK/jre/lib to /JRE/lib and Tomcat worked fine after that.

Wesley
  • 32,320
  • 9
  • 80
  • 116
0

Look for a file called tomcat(4|5|6)w.exe in your Tomcat directory? If you see one, run the file and you will get a configuration dialogue up. Check the Java tab and see if this all seems ok.

Make sure the paths to the files jvm.dll and bootstrap.jar are fine.

This works for Tomcat 4 and 5, but I'm not sure about Tomcat 6.

Wesley
  • 32,320
  • 9
  • 80
  • 116
James
  • 128
  • 3
  • 15
-1

A simple reinstall of Java fixes this immediatey!

JamesK
  • 1,646
  • 11
  • 19