Getting Tomcat Apache To Run On Microsoft Windows 7

[ 69 ] Comments
Share

So the last few days I have been updating my work laptop to Microsoft Windows 7 Release Candidate. I have now successfully reinstalled most of my existing software. This also includes a new installation of ArcGIS 9.3.1. I am very impressed with Windows 7 Release Candidate, Microsoft has done a great job with this release. A few new features but also tons of bug fixes.

One of the last pieces of software I needed to reinstall was Tomcat Apache. I use Tomcat Apache for a few web applications and thus the need to install this. I downloaded the latest version. Tomcat Apache 6.0.18. Installation is as per normal. Attempting to start the Tomcat Apache process you get the following:

1

2

Tomcat Apache fails to start with the above error. The error isn’t very informative so digging further by looking at the Apache Tomcat logs you get the following:

3  

Having a look at the logs we can see that the JRE is reporting a missing module which cannot be found. The file that is missing is named: msvcr71.dll. While this file should exist in your JRE folder, Tomcat Apache cannot access it.

The simple fix for this problem is to copy the msvcr71.dll from your JRE folder to the Apache Tomcat /bin folder as per screenshot below.

4

Attempting to start the Tomcat Apache service again will work fine.

5

While the fix is really simple, it too me a while to figure this one out and research it. I am not sure whether this applies to x86 or x64 versions or both but I am running Windows 7 x64. There are a few issues I have found with ArcGIS 9.3.1 and ArcGIS Server 9.3.1 on Windows 7 so I’ll blog about them as soon as I can.

69 Responses To Getting Tomcat Apache To Run On Microsoft Windows 7

  1. Paco Camarillo says:

    Thanks bro, it was a great help for me………

  2. avis says:

    thx… it also fixed my apache in xampp lite =p

  3. ply says:

    Big thanks!

  4. MethoD says:

    I’ve successfully started tomcat on windows 7 RC 7127.

    I’ve changed tomcat folder permission by adding write privilege to tomcat folder.

  5. Mr Trung says:

    Thanks for yur help. I control my apps now ^^ thanks

  6. Benevid says:

    Thanks’s ….still running

  7. Vincent says:

    Thanks! It worked great.

  8. Patryk says:

    Great! It worked like a charm! Didn’t notice any other compatibility issues regarding Windows 7. I think Microsoft finally did some really good work with this OS.

  9. Lenin says:

    Thanking you

  10. inFame says:

    U r the man!!!!

    Thanks a lot!!!

    Eres grande hermano!!! En verdad una gran ayuda para los que apenas comenzamos con Apache

    Gracias otra vez!!!

  11. Roopesh says:

    Thanks a lot, U made my job easy….

  12. Tostau says:

    Hi, this tutorial seems very usefulll… but it doesn’t work for me..

    I have a Windows 7 Professional on a Dell XPS16, i tried to installa Apache Tomcat 6.0 and i had the problem you fix… unfortunately i haven’t solve it. In my Java installation folder i haven’t the file <msvcr71.dll> so i downloaded it but it still doesn’t work… I reboot several times. I have java 1.6 installed, could it be that the problem??

  13. RE: Getting Tomcat Apache To Run On Microsoft Windows 7

    windows7下tomcat的安装问题

  14. Kalle says:

    Thank you! Worked great

  15. Michael says:

    I can’t get it to work with Windows 7 64 bit. Any ideas?

  16. Antonio says:

    Muy buen consejo, ude hacer funcionar conesto mi tomcat 6 en Windows 7 x64 gracias !

  17. Chen says:

    I copied the DLL and it still doesnt work (Windows 7 RC). any idea why? thanks

  18. Felipe Messina says:

    THANK YOU VERY MUCH about this fix, you SAVE MY LIFE =) . Thanks for share

  19. John Fiala says:

    Thanks a lot! This is just what I needed to get Tomcat working on Windows 7 Professional 64 bit.

  20. Pinux says:

    Tnks a lot. Now it’s working fine!!!

  21. Martin says:

    thanks a lot for this fix. i’m using win7 since beta problem with tomcat was the only one i had with this os.

  22. karthik says:

    Thanks a lot…..

    It’s working

  23. Arun says:

    well, it works.
    Thanks a lot.

  24. echo9 says:

    i was getting an error:

    javaw.exe – ordinal not found

    the ordinal 2502 could not be located in the dynamic linked library
    LIBEAY32.dll

    this is whats the error window said^ :(

    and even after copying the dll into tomcat/bin it din’t worked out for me..

    suggestions..anybody..?

  25. Nilesh says:

    I HAVE SOME PROBLEM IN TAOMCAT 6 THAT IS NOT WOTKING PROPERLY I HAVE SOME ERROR ACCESS IS DENIED.
    BUT WHEN I INSTALL TOMCAT6 IT WORKING PROPERLY WHEN I RESTART MY SYSTEM AND THEN START TOMCAT6 THAT IS ERROR DISPLAY ACCES IS DENIED .
    PLS GIVE ME SOME SOLUTION…

  26. LRL says:

    Thanks very much that worked a treat on Windows 7 X 64

  27. Adam says:

    This really seemed to help quite a few people. It didn’t do anything for me. Does anyone else have any ideas? Using 64 bit, redownload and installed tomcat and JDK etc., etc.

    Any help would be appreciated.

  28. HArry says:

    Thanks dude !

  29. Windows 7 says:

    Hi,
    it’z amazing blog . I just added you to my News Reader. Keep up.
    Regards,
    Jone

  30. Praveen says:

    Thanks a lot…It helped me a lot..

  31. Mateus says:

    Hey dude,

    in tomcat 5.5 dont working :(

  32. Vaibhav says:

    Hi,
    I have tomcat6.o on windwos 7 ultimate.
    When i run servlet from my browser by typing http://localhost:8080/examples/servlet/servlet_name
    the same file of servlet runs in windows-xp but not on windows-7
    Please replay on vaibhav.great@yahoo.com

  33. Karthick says:

    what makes it work?

    I installed 32 bit JVM, then downloaded apache-tomcat-6.0.26-windows-x86.zip(not the windows installable). Extracted it into c:\apache\ and tried registering the Tomcat as a service by clicking on $CATALINA_HOME\bin\service.bat. It failed with a message stating that registration failed. But it is now working with this msvcr71.dll inside $CATALINA_HOME\bin\.

    Please let me know about what was earlier missing or what have made it to work now??

    • Anooj says:

      I am also having the same problem on Windows 7 Pofessional. It starts and then goes away.. When i check the processes running it doesn’t show Tomcat6 Can anyone please explain whats happening.

  34. Gert Villemos says:

    Had the same problem, solution suggested here didn’t help (got a different error in the log, something like ‘cant start service’).

    Discovered that I had installed the wrong Java version (32x, not 64x as my system was).

    So check your system properties (open a Windows Explorer, right click on ‘Computer’, select properties). On the properties page, check the ‘System type’.

    Mine was ’64-bit Operating System’. So I installed a new Java version. Then everything worked fine, with no copying of any files.

  35. Nitish Mishrra says:

    I could not fix my problem…
    please help me.. I have windows 7 of 64 bit OS…please mail me on aries.mishra@gmail.com

  36. vijay says:

    Thanks guru , thanks very much.

  37. Gayan says:

    Thanks a lot….

  38. narendra says:

    which tomcat version is use for window 7 please tell me

  39. gmw says:

    What if I have Windows 7 Home Premium? (not Professional).

    Please use A,B,C – 1,2,3 (simple, elementary, black and white, straightforward language)

    Thank you !

  40. william says:

    my problem is when i change the code of server.xml, i can not save it,it is not allowed!

  41. Simon says:

    Dude,
    Thanks so much, this little nugget of info just helped me out.

  42. ranajoy says:

    i am using windows 7 ultimate(64 bit),which version of Tomcat will be suitable for my os?please help me sir!

  43. Hemant Barawkar says:

    i am using windows 7 64 bit and not able to use tomcat on windows 7
    please help me!!!!

  44. Nithin says:

    Thanks a lottttt brrrroooooo!

  45. Hazem Fergany says:

    Thanks,
    It is working now :) .

  46. Michael Kyritsis says:

    The advice above did not work for me, but my problem was definately related to 64 bit, and here’s how I fixed it:

    * (I am running Windows 7 Enterprise edition 64 bit)
    * uninstall JRE (it turns out I had 32 bit edition)
    * uninstall Apache Tomcat
    * manually delete “c:\program files\java” and “C:\Program Files\Apache Software Foundation\Tomcat 5.5″ (which should be empty, or have been removed by uninstallation – just make sure)
    * use MS Internet Explorer to download Java. This is important! Do not use Mozilla Firefox (which I what I tried before) as Sun (Oracle)’s website then does not give you a linke to the 64 version of the Java VM. Only if you use MS Internet Explorer will you see a link to “jre-6u22-windows-x64.exe”
    * once you’ve installed the jre (I let it install to the default location) install Apache Tomcat, the tomcat service starts without the need for me to copy any dll’s, or edit my environment variables.

  47. surasak.lmt says:

    i use windows7 prof. 32bit

    i proved.
    Example:
    CATALINA_HOME: D:\apache-tomcat-7.0.4
    JAVA_HOME: D:\Java\jdk1.6.0_22
    JRE_HOME : D:\Java\jre6

    then

    run startup.bat

    for me ->it’s successful

  48. surasak.lmt says:

    but, i not copy msvcr71.dll Apache Tomcat /bin folder

    i use windows7 prof. 32bit

    i proved.
    Example:
    CATALINA_HOME: D:\apache-tomcat-7.0.4
    JAVA_HOME: D:\Java\jdk1.6.0_22
    JRE_HOME : D:\Java\jre6

    then

    run startup.bat

    for me ->it’s successful

  49. novi says:

    APPACHE TOMCAT SERVER IS NOT WORKING IN MY WINDOWS7 OPERATING SYSTEM HOW IT IS POSSIBLE. IF YOU KNOW PLEASE SEND ME SOLUTION TO MY EMAIL…yardh_changzou@yahoo.com

  50. Luiz Otávio says:

    Cara, Está funcionando direitinho. Vc foi o anjo enviado por DEUS. Tenho 1 projeto pra entregar na segunda. Vlw man.

  51. Saurav Singh says:

    U r the man.. It worked fine.
    Thanks a lot..

  52. Md Sahanawaz says:

    Thank u for helping me…………..
    Apache tomcat now running

  53. sarita mishra says:

    thanks for information.
    my problem are solved.

  54. naresh says:

    thanks for information

  55. Rami reddy says:

    Thanks man , my problem also solved

  56. Adithya says:

    Hey! My Tomcat application is not getting started .

    What do I do now!!!
    Help me out!!!!!!

  57. Shrini says:

    Apache tomcat 5.5.30 is not working in windows7 ultima..The service starts and stops in the middle

  58. Shrini says:

    I need solution soon for my work!!! Some one help !!!!!!!!!Apache tomcat 5.5.30 is not working in windows7 ultima..The service starts and stops in the middle

  59. Mohammed Aleem says:

    Hi,I installed the tomcat6 on windows 7 but am unable to connect to http://localhost:8080/
    Thought i started the service , the Tomcat icon appears in the taskbar, can anybody suggest me..

    • jyothi says:

      please check that u r having oracle r not.if there then it will take the default port no. as 8080 which is also port no. for tomcat.so i suggest u that change ur port no. for tomcat while installing then try to give that port no. in url for getting ur tomcat home page.