Tomcat Error – prunsrv.c Failed creating java (jvm.dll)

I had encountered following error message while starting my Tomcat server.

[2009-01-16 11:22:19] [1343 prunsrv.c] [debug] Procrun log initialized
[2009-01-16 11:22:19] [info] Procrun (2.0.4.0) started
[2009-01-16 11:22:19] [info] Running Service...
[2009-01-16 11:22:19] [1166 prunsrv.c] [debug] Inside ServiceMain...
[2009-01-16 11:22:19] [info] Starting service...
... [error] The specified module could not be found.
[2009-01-16 11:22:19] [994  prunsrv.c] [error] Failed creating java 
C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll
[2009-01-16 11:22:19] [1269 prunsrv.c] [error] ServiceStart returned 1
[2009-01-16 11:22:19] [info] Run service finished.
[2009-01-16 11:22:19] [info] Procrun finished.
[2009-01-16 11:24:41] [1343 prunsrv.c] [debug] Procrun log initialized
[2009-01-16 11:24:41] [info] Procrun (2.0.4.0) started
[2009-01-16 11:24:41] [info] Debugging Service...
[2009-01-16 11:24:41] [1166 prunsrv.c] [debug] Inside ServiceMain...
[2009-01-16 11:24:41] [info] Starting service...
...[174  javajni.c] [error] The specified module could not be found.

After googling, this is usually happen because of missing msvcr71.dll file. However tomcat doesn’t use msvcr71.dll directly, it’s used by the Java Virtual Machine (JVM).

Solution

  1. Copy msvcr71.dll from java’s bin directory to tomcat’s bin folder.
  2. Add java’s bin directory to windows environment variable.
  3. Copy msvcr71.dll from java’s bin directory to windows\system32 folder.
  4. Make sure your tomcat’s pointing to correct jvm.dll folder.

Solution 4 is work for me, my tomcat pointing to C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll, but my java’s runtime folder is located at C:\Program Files\Java\jre\bin\client\jvm.dll..what a joke.

Updated, 19-Sept-2009
Here is a similar error, it happened recently


... [174  javajni.c] [error] %1 is not a valid Win32 application.
... [994  prunsrv.c] [error] Failed creating java 
C:\Program Files\Java\jre6\bin\server\jvm.dll
... [1269 prunsrv.c] [error] ServiceStart returned 1

It’s seem server\jvm.dll is not working property, just change it to client\jvm.dll will do.

From


C:\Program Files\Java\jre6\bin\server\jvm.dll

To


C:\Program Files\Java\jre6\bin\client\jvm.dll
author image

mkyong

Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities. Read all published posts by

Comments

avatar
newest oldest most voted
akeo563
Guest
akeo563

Hi !! mkyong thank for this solution it very useful for me thanks again ^^

abu
Guest
abu

hj.thanks much
its useful for me.
later.3 hour try install it.i catch post of you.help me install successfull

Kevin
Guest
Kevin

I’m still stuck…tried the first 3 solutions w/no luck. I’m on Win XP SP3 – when I get properties on Tomcat6.exe I get a standard Windows property dialog – how do you get the richer properties dialog shown here – where I can edit the JVM path directly? I’ve tried reinstalling and selecting the JVM path as C:\Program Files\Java\jre1.6.0_11\bin\client\jvm.dll directly, but the installer won’t accept the path…

Thanks

Jon
Guest
Jon

Work for me

Leonardo Carreira
Guest
Leonardo Carreira

Thanks for your post, it really help for me.. πŸ™‚

Keep up your work sir..

Warm Regards,
Leonardo Carreira ?

Mamta
Guest
Mamta

Hi !! mkyong thank for this solution it very useful for me thanks again

jdc
Guest
jdc

i came across your post when googling error messages. My problem ended up being not the funky jvm location, but that jvm and/or other dlls require Win32:

[2009-06-24 17:02:18] [174 javajni.c] [error] %1 is not a valid Win32 application.
[2009-06-24 17:02:18] [994 prunsrv.c] [error] Failed creating java C:\jdk1.6.0_14\jre\bin\server\jvm.dll

After stepping back from the 64bit jdk and using the 32bit, things started up smoothly

Hannes Niemi
Guest
Hannes Niemi

Thanks,
my case was msvcr71.dll. Copying it to tomcat bin made it work.

Chris
Guest
Chris

Thanks all – the original post and comments were VERY helpful! Solution #1 solved it. in my case Java was installed on a C: drive and Tomcat on a D: drive – not sure if it contributed the problem, but alls well now.

software development company
Guest
software development company

Interesting,

it worked perfectly

Keep up the good work

lukul2003
Guest
lukul2003

Thanks All,
The original post and comments were VERY helpful!
my case was msvcr71.dll. Copying it to tomcat bin made it work.

Web Page Designers
Guest
Web Page Designers

Good job… thanks for this info post.

Marc
Guest
Marc

Hi,

Thanks for the solution.
Solution 3 worked for me.

Jinny
Guest
Jinny

Hello,
Onload of page my antivirus put alert, check pls.
Thank you

deathbytomcat
Guest
deathbytomcat

Thanks to the information on this site I’ve diagnosed and fixed several issues – much appreciated. Using Tomcat5, From what I understand:

Java bit JVM (requirements)
1.6 32 server (does not work)
1.6 32 client (requires msvcr71.dll in PATH)
1.5 64 server (requires 64-bit tomcatX.exe)
1.5 64 client (n/a)
1.5 32 server (ok)
1.5 32 client (ok)

happy hunting

Tigr
Guest
Tigr

Thanks a lot for sharing this great helpful tip!

Sam Tsai
Guest
Sam Tsai

Thank you mk! The original post and comments were VERY helpful! ! Solution #2 solved it.
I just forgot to add java bin’s directory path to Windows environment variable. Ha.

Artem
Guest
Artem

Thank you! Thank you very much!

jerry.xie
Guest
jerry.xie

my soltuion. after run ${tomcat_home}\bin : service.bat , the question fixed .

Karin
Guest
Karin

Thank you, thank you, thank you. I’m a DBA thrown into the world of configuring and setting up Java websites or in this case, upgrading one. This solved my problems!

Chern Dong
Guest
Chern Dong

It works!
Thank you.

ashish
Guest
ashish

Hi,
It works

deb_w
Guest
deb_w

I am trying to install Tomcat on a Windows Server 2003 SP2 machine and none of the solutions above are working for me. I have copied the msvcr71.dll file to the appropriate paths, change to the client jvm, rebooted the system.

System variables are entered too.

Nothing works I still receive the ‘Failed creating java’ error. Can anyone help?

Putra Agung H J
Guest
Putra Agung H J

it’s work, thank you πŸ˜€

Dale King
Guest
Dale King

In my case the problem was that if you install Tomcat under Windows 7 x64 you also need the Windows x64 version of Java.

Eduardo
Guest
Eduardo

Gracias, en mi caso era esta misma situaciΓ³n.

OscarLaura
Guest
OscarLaura

It works thanks, copy the dll to the tomcat folder

minqi
Guest
minqi

thanks alot, it works

ashelton3
Guest
ashelton3

I’ve followed all four steps in the solution above and I am still getting the problem. I am using jre1.6.0_18 in “Program Files (x86)”. I installed a 64-bit version of Java in “Program Files” but its bin directory does not contain a client subdirectory. Should I follow the steps above for the server directory, instead? I am on Windows 7 Home Premium. Thanks.

ashelton3
Guest
ashelton3

Thanks for the advice. I renamed bin/server to bin/client in my Java 64-nit installation and all worked well. How strange.