1 2 3 4 Previous Next 58 Replies Latest reply on May 21, 2010 3:38 AM by darrylburke Go to original post
      • 30. Re: Can't register Tomcat as Windows service on some computers, under Java6
        843829
        Moving/Copying the msvcr71.dll is a terrible idea. In fact both Apache Tomcat and the Sun JDK are working as expected. Really the problem is that you don't have everything on your path when the service is trying to start. You need the msvcr71.dll on your path, it is included in the JDK_HOME\bin folder as well. Making sure your JAVA_HOME and PATH environment variables are correct should fix this. If not your configuration of Tomcat is incorrect. You want to make sure your JVM setting is correct, I'd use:
        C:\Program Files\Java\jdk1.6.0_05\jre\bin\server\jvm.dll
        if you have a standard Windows installation of the 1.6.0_05 JDK. Notice that I'm using the server version of the dll. This is recommended if you are using this as a service, it will also boost the default memory and threading settings on the JDK.
        • 31. Re: Can't register Tomcat as Windows service on some computers, under Java6
          843829
          Thank you very much!!
          Great idea to use filemon to find out the solution.
          • 32. Re: Can't register Tomcat as Windows service on some computers, under Java6
            843829
            After setting up Tomcat on a new Windows 2003 x64 SP2 server, I wanted to configure it to run as a Windows service. After running "Service.bat", the new service properly shows up in Windows Service Management, but when I try and start it, I get a message that:

            "Windows could not start the Crowd (Apache Tomcat) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 0."

            After looking in the System Event log, I see:

            "The Crowd (Apache Tomcat) service terminated with service-specific error 0 (0x0)."

            I also looked in the "jakarta_service_20080512.log", and found another error message:

            "2008-05-12 15:33:59 info Procrun (2.0.3.0) started
            2008-05-12 15:33:59 info Running Service...
            2008-05-12 15:33:59 info Starting service...
            2008-05-12 15:33:59 http://174 javajni.c error %1 is not a valid Win32 application.
            2008-05-12 15:33:59 http://986 prunsrv.c error Failed creating java C:\Program Files\Java\jdk1.6.0_06\jre\bin\server\jvm.dll
            2008-05-12 15:33:59 http://1260 prunsrv.c error ServiceStart returned 1
            2008-05-12 15:33:59 info Run service finished.
            2008-05-12 15:34:00 info Procrun finished."

            The jvm.dll definitely resides in that directory, and after running Filemon, I found that the msvcr71.dll is only accessed when running the startup.bat (which is successful); but not when attempting to start the configured service. The only significant "NOT FOUND" messages that I find via Filemon is that half way through loading, there are a number of failed calles from csrss.exe (Microsoft Client/Server Runtime Server Subsystem) to tomcat5.exe, and it searches each directory in the system PATH to find it, with no success:

            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\system32\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\system32\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\system32\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\system32\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\system\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\system32\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\WINDOWS\System32\Wbem\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\Program Files\Microsoft SQL Server\90\Tools\binn\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\tomcat5.exe     NOT FOUND     Attributes: Error     +
            +4:08:20 PM     csrss.exe:360     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\tomcat5.exe     NOT FOUND     Attributes: Error     +

            After this, it successfully accesses the jvm.dll, writes messages to the jakarta_service_*.log and moves closes.

            Has anyone else seen this? If so, do you have any tips on how to resolve this?

            Thanks!

            -Matt
            • 33. Re: Can't register Tomcat as Windows service on some computers, under Java6
              843829
              On closer inspection of the Filemon dump, it also looks like it is missing these files, which I suspect are insignificant:

              4:22:27 PM     services.exe:432     OPEN     C:\Inetpub\wwwroot\crowd\apache-tomcat\bin\tomcat5.exe.Manifest     NOT FOUND     Options: Open Access: 001200A9     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Inetpub\wwwroot\crowd\apache-tomcat\bin\tomcat5.exe.Local     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Inetpub\wwwroot\crowd\apache-tomcat\bin\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\system32\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\system\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\system32\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\system32\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\WINDOWS\System32\Wbem\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files\Microsoft SQL Server\90\Tools\binn\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Program Files\Java\jdk1.6.0_06\bin\wow64log.dll     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Inetpub\wwwroot\crowd\apache-tomcat\bin\tomcat5.exe.Local     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     OPEN     C:\WINDOWS\syswow64\SHELL32.dll.124.Config     NOT FOUND     Options: Open Access: 001200A9     
              4:22:27 PM     tomcat5.exe:424     QUERY INFORMATION     C:\Inetpub\wwwroot\crowd\apache-tomcat\bin\tomcat5.exe.Local\     NOT FOUND     Attributes: Error     
              4:22:27 PM     tomcat5.exe:424     OPEN     C:\WINDOWS\WindowsShell.Config     NOT FOUND     Options: Open Access: 001200A9
              • 34. Re: Can't register Tomcat as Windows service on some computers, under Java6
                843829
                excuse me, wrong thread..

                Edited by: jnee on May 13, 2008 5:34 AM
                • 35. Re: Can't register Tomcat as Windows service on some computers, under Java6
                  843829
                  Matt,

                  I am having the same issue - have you come across a solution yet?
                  • 36. Re: Can't register Tomcat as Windows service on some computers, under Java6
                    843829
                    I did end up solving this. I suspect that my issue was tied to installing the JDK on x64. My initial install of the JDK had some components placed in the C:\Program Files directory (64 bit apps).

                    After I uninstalled the JDK and reinstalled it on the server, the components now reside in the C:\Program Files (x86) directory, which seemed to resolve my dependency issues and make everything work correctly.

                    I wish I could point you to the exact file, etc. that resolved the issue, but that seems to be what did it for us.

                    -Matt
                    • 37. Re: Can't register Tomcat as Windows service on some computers, under Java6
                      843829
                      I had the same problem on mine. I was running JRE 6 and attempting to start Tomcat 6.0.16 and was getting the exact same error. I copied msvcr71.dll from the bin directory of JRE 6 to c:\windows\system32 and Tomcat started on the very next try. Thanks for your research.
                      • 38. Re: Can't register Tomcat as Windows service on some computers, under Java6
                        843829
                        Thank you, only by copying this file was enough!
                        • 39. Re: Can't register Tomcat as Windows service on some computers, under Java6
                          843829
                          Joes,

                          Really, a better solution is to configure system variables JAVA_HOME and PATH (Control Panel / System / variables. For example, with jdk1.6.0_06:

                          JAVA_HOME
                          C:\Program files\Java;

                          PATH
                          %SystemRoot%\system32; ... ;C:\ Program files \Java\jdk1.6.0_06\bin;C:\ Program files \Java\jdk1.6.0_06\jre\bin;

                          and restart Windows...
                          • 40. Re: Can't register Tomcat as Windows service on some computers, under Java6
                            843829
                            thanks a lot your comment, i solve the problem.
                            • 41. Re: Can't register Tomcat as Windows service on some computers, under Java6
                              843829
                              for Windows x64 users:
                              The same error occurs when you try to run the standard tomcat binaries on Windows x64.

                              You need to replace the tomcat5.exe and tomcat5w.exe by 64-bit binaries.
                              You can find them e.g. for Tomcat 5.5 in:
                              http://svn.apache.org/viewvc/tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_20/procrun/bin/
                              • 42. Re: Can't register Tomcat as Windows service on some computers, under Java6
                                843829
                                I copied msvcr71.dll to Tomcat 6.0\bin and it worked. Thanks.:)
                                • 43. Re: Can't register Tomcat as Windows service on some computers, under Java6
                                  843829
                                  It's not about Sun Microsystem. Tomcat is created by Apache Group. Actually Tomcat's documentation should provide this information.
                                  About java path I'm sure that every successful installation of JDK or JRE would add the java location into environment variables, except for the variables "java_home" we have to add it manually, and it was stated in the tomcat's documentation.
                                  • 44. Re: Can't register Tomcat as Windows service on some computers, under Java6
                                    843829
                                    I have the same problem. i'm using jdk1.6 and tomcat6.0. i could run the service through command line, but i couldn't run by using (Programs -> Apache Tomcat 6.0 -> Configure Tomcat). I don't know the reason.

                                    I have copied the "msvrc71.dll" to "windows\system32\". But i couldn't start service. I'm getting logs as

                                    ++[2008-09-06 12:51:20] [174 javajni.c] [error] %1 is not a valid Win32 application.++
                                    ++[2008-09-06 12:51:20] [994 prunsrv.c] [error] Failed creating java++
                                    ++[2008-09-06 12:51:20] [1269 prunsrv.c] [error] ServiceStart returned 1++

                                    could you give me solution?

                                    Edited by: Rameshsrmn on Sep 6, 2008 12:22 AM