Bug 43726 - Tomcat does not start when using a 64bit JDK on Windows
Summary: Tomcat does not start when using a 64bit JDK on Windows
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.24
Hardware: PC Windows Server 2003
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-29 10:07 UTC by Igor Ebner de Carvalho
Modified: 2008-06-19 13:32 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Ebner de Carvalho 2007-10-29 10:07:02 UTC
Reproducible: yes
---
How to reproduce: set JAVA_HOME to a 64bit JDK and start the tomcat

---
Description:
The same tomcat version (5.5.25 from zip archive) runs under Linux when I use a
64bit JDK, But under Windows it won't start.
I am not sure if this is a bug or just not meant to run. (I didn't find the
specification regarding this issue)

---
Excerpt from the logs:

[2007-10-29 18:00:14] [info] Procrun (2.0.3.0) started
[2007-10-29 18:00:14] [info] Service Tomcat5 name Apache Tomcat
[2007-10-29 18:00:14] [info] Service Tomcat5 installed
[2007-10-29 18:00:14] [info] Procrun finished.
[2007-10-29 18:00:14] [info] Procrun (2.0.3.0) started
[2007-10-29 18:00:14] [info] Updating service...
[2007-10-29 18:00:15] [info] Service Tomcat5 updated
[2007-10-29 18:00:15] [info] Update service finished.
[2007-10-29 18:00:15] [info] Procrun finished.
[2007-10-29 18:00:15] [info] Procrun (2.0.3.0) started
[2007-10-29 18:00:15] [info] Updating service...
[2007-10-29 18:00:15] [info] Service Tomcat5 updated
[2007-10-29 18:00:15] [info] Update service finished.
[2007-10-29 18:00:15] [info] Procrun finished.
[2007-10-29 18:00:26] [info] Procrun (2.0.3.0) started
[2007-10-29 18:00:26] [info] Running Service...
[2007-10-29 18:00:26] [info] Starting service...
[2007-10-29 18:00:26] [174  javajni.c] [error] %1 is not a valid Win32 application.
[2007-10-29 18:00:26] [986  prunsrv.c] [error] Failed creating java
C:\jdk1.5.0_11\jre\bin\server\jvm.dll
[2007-10-29 18:00:26] [1260 prunsrv.c] [error] ServiceStart returned 1
[2007-10-29 18:00:26] [info] Run service finished.
[2007-10-29 18:00:26] [info] Procrun finished.
Comment 1 Mark Thomas 2007-10-29 10:17:16 UTC
Running in 64-bit windows you need the 64-bit version of the service wrapper.
You  can get these from svn. I don't think they are included in the 5.5x distro

https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/
Comment 2 Igor Ebner de Carvalho 2007-10-30 07:24:03 UTC
Ahh... I see... This is not a part of the tomcat itself but just the c part for
the windows services.

I renamed the 64bit service wrapper to tomcat5(w).exe and it works fine for me.
Thanks a lot!
Comment 3 Jeremy Matthews 2008-06-19 12:50:28 UTC
(In reply to comment #1)
> Running in 64-bit windows you need the 64-bit version of the service wrapper.
> You  can get these from svn. I don't think they are included in the 5.5x distro
> 
> https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/

Revisiting this issue... my scenario is slightly different. I have a 6.0.16 distribution. I went to the link you gave, went to the amd64 folder (I have Intel chip which I hear should be ok), downloaded, and replaced the tomcat6.exe and tomcat6w.exe. I do "service.bat install", but when I start the service in Services, it fails, and I get the following in jakarta_service log:

[2008-06-19 14:34:17] [info] Procrun (2.0.4.0) started
[2008-06-19 14:34:17] [info] Service Tomcat6 name Apache Tomcat
[2008-06-19 14:34:17] [info] Service Tomcat6 installed
[2008-06-19 14:34:17] [info] Procrun finished.
[2008-06-19 14:34:17] [info] Procrun (2.0.4.0) started
[2008-06-19 14:34:17] [info] Updating service...
[2008-06-19 14:34:17] [info] Service Tomcat6 updated
[2008-06-19 14:34:17] [info] Update service finished.
[2008-06-19 14:34:17] [info] Procrun finished.
[2008-06-19 14:34:17] [info] Procrun (2.0.4.0) started
[2008-06-19 14:34:17] [info] Updating service...
[2008-06-19 14:34:17] [info] Service Tomcat6 updated
[2008-06-19 14:34:17] [info] Update service finished.
[2008-06-19 14:34:17] [info] Procrun finished.
[2008-06-19 14:34:59] [info] Procrun (2.0.4.0) started
[2008-06-19 14:34:59] [info] Running Service...
[2008-06-19 14:34:59] [info] Starting service...
[2008-06-19 14:34:59] [174  javajni.c] [error] The specified module could not be found.
[2008-06-19 14:34:59] [994  prunsrv.c] [error] Failed creating java 
[2008-06-19 14:34:59] [1269 prunsrv.c] [error] ServiceStart returned 1
[2008-06-19 14:34:59] [info] Run service finished.
[2008-06-19 14:34:59] [info] Procrun finished.

This similar to the errors I get when trying to start the distro, but there's the javajni.c error in addition. This is on Windows 2003 Server Standard x64 Edition SP2. 
Comment 4 Mark Thomas 2008-06-19 13:32:01 UTC
I'm closing this as the 64-bit service wrapper works for the OP (comment #2). I'm closing this as invalid as there isn't actually a Tomcat bug here.

The error in comment #3 is a different one. See bug 41538 for a long explanation (my view is that this is a JVM issue - Sun disagrees) or for the quick fix copy msvcr71.dll from %JAVA_HOME%\bin to %SYSTEM_ROOT%\system32 or any other location on the path.