Apache Tomcat 6 Startup Error
I recently had to install Apache Tomcat 6 on a Windows Server 2003 machine and I ran into a problem which prevented the Tomcat service from starting. I had already installed the Java Runtime and then installed Tomcat following the default options. However, the Tomcat service just wouldn’t start. I looked in the Windows System Event Log and saw the rather unhelpful error message shown below. So, in order to try and get a handle on the problem I decided to run some monitoring on the server whilst the Tomcat process was starting. This is what I discovered.
The service failed to start again and the same entry appeared in the System event log.
I delved a bit deeper and discovered that the Tomcat service writes to a log file called jakarta_service_YYYYMMDD.log, so I looked in this file and saw the following entry : [994 prunsrv.c] [error] Failed creating java C:\Java\bin\client\jvm.dll
As you can see the error in the log file seemed to suggest that there was a problem with the file jvm.dll in the C:\Java\bin\client folder. I looked in that folder and I could see that the file was already there - so why should Tomcat be throwing an error suggesting there was a problem creating the file ?
Thinking I was perhaps facing a permissions issue I reached for a copy of Sysinternals Process Monitor and fired up a trace on the server whilst trying once more to start the Tomcat service. What I found was quite interesting.
The Tomcat service (tomcat6.exe) seemed to be able to find the jvm.dll file OK but then it appeared to be looking for a file called MSVCR71.DLL and, as you can see highlighted in the screen capture below, it wasn’t able to locate this file in any of the folders in which it was searching. Immediately following this you can see the tomcat6.exe process start writing to its own log file (jakarta_service_20080826.log) recording the error message shown above.

Since Tomcat was unable to find this file I decided to see if I could. I searched the whole of the C drive on the server and actually found the MSVCR71.DLL file in the locations shown here.
As you can see the file was actually found on my server - just not in any of the locations in which Tomcat was looking. The solution was simple. Once I had copied MSVCR71.DLL to the C:\Java\bin\client folder the Tomcat service started successfully.
You can get the Sysinternals free utilities here : http://technet.microsoft.com/en-us/sysinternals/default.aspx