views:

18671

answers:

7

Installed Tomcat 6 on WinXP 64. It installed just fine. But when I try to launch it ( from Windows Services) I get the following error : "Can not start an the Apache Tomcat Service on Local computer." error 216:0xd8

+7  A: 

It's well known issue.

Tomcat wrapper for windows service is compiled for 32 bits JDK.

Steps that should allow you to install Tomcat as windows service under JDK64bits.

  1. Download Tomcat binary installation (zip file; exe file will not find 64 bits JDK/JRE).

  2. Extract files from the archive.

  3. Rename tomcat5.exe (tomcat6.exe) to tomcat5.exe.32bits to (tomcat6.exe.32bits)

  4. Extract 64 bits Tomcat wrapper from tomcat5_5_64bits_wrapper.zip and rename it to tomcat5.exe (tomcat6.exe). See details are here. (Update: The Bugzilla post seems to be down, but I believe an updated exe file can be found in the Tomcat SVN Repository).

  5. Install it as Windows service executing "service.bat install [Tomcat instance name]", where [Tomcat instance name] is optional windows service name.

  6. Under certain conditions tomcat is not correctly configure service registry values. It points out itself to 32 bits version of JRE/JDK instead of 64 bits. It can be done explicitly (path to wrong JDK/JRE) or implicitly ("auto" value that imply using of JAVA_HOME or JRE_HOME that point out to 32 bits version). Anyway, it's highly recommented check registry value that define which version of JDK/JRE will be used for tomcat windows service, see key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0[Tomcat instance name]\Parameters\Log\jvm and point it out to correct 64 bits JDK/JRE (e.g. jvm=C:\Program Files\Java\jdk1.5.0_15\jre\bin\server\jvm.dll).

FoxyBOA
Regarding #4 ["Extract 64 bits Tomcat wrapper from tomcat5_5_64bits_wrapper.zip and rename it to tomcat5.exe (tomcat6.exe)"], it would be nice to know where to get tomcat5_5_64bits_wrapper.zip. Is that something linked to in the Bugzilla issue referred to in the datajelly.com blog post? The datajelly post currently suggests the Bugzilla post is no longer available. If so, I guess the updated version of the instructions should be to download updated Tomcat exes instead from the Tomcast Repository, as described in Ed Thomas' answer here.
Chris
Instead of #4 you can download appropriate exe files from http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_18/res/procrun/amd64/ as mentioned by Ed Thomas
FoxyBOA
For #4, I tried to download from the svn.apache.org/viewvc/... but I could not find out how to download the exe. It would always just show the binary content in an HTML page. To download the exe, you can use TortoiseSVN (or any SVN client) and navigate to the appropriate directory under http://svn.apache.org/repos/asf/tomcat.
Liron Yahdav
+2  A: 

I've struggled with this. I was trying to install Tomcat 6 on a Windox XP x64 system running on a virtual Intel Xeon CPU (X5460). I used FoxyBOA's comment as a guide, but offer the following:

  1. Install the Windows x64 JRE from Sun.
  2. Install Tomcat 6 (I used the Windows Service Installer version), you'll have to manually point it to the JRE you downloaded during the install (just click the "..." button and find the jre6 directory).
  3. Download updated versions of tomcat6.exe and tomcat6w.exe from the Tomcat Repository (you may want to find the tag that matches the exact version of Tomcat you downloaded) and place these in the bin directory. I don't know why the amd64 version works on an Intel processor, but it does.

After that, everything worked: I was able to startup Tomcat with its service manager and with the Windows Service Management Console.

At the time I did this, I used Tomcat 6.0.18 and Sun Java 6 Update 12 (64-bit).

Ed Thomas
Excellent, your answer completes FoxyBOA's answer.
ripper234
Following this worked perfectly to get Tomcat 6.0.24 running as a service under Windows 7 64bit. The 'monitor tomcat' application still doesn't run though - (v6.0.24 doesn't appear to have a 64bit version of this and v6.0.18 doesn't work).
Jamie Love
A: 

Just modify step 6 so you put it in java instead of log in the registry value

  1. Under certain conditions tomcat is not correctly configure service registry values. It points out itself to 32 bits version of JRE/JDK instead of 64 bits. It can be done explicitly (path to wrong JDK/JRE) or implicitly ("auto" value that imply using of JAVA_HOME or JRE_HOME that point out to 32 bits version). Anyway, it's highly recommented check registry value that define which version of JDK/JRE will be used for tomcat windows service, see key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0[Tomcat instance name]\Parameters*java*\jvm and point it out to correct 64 bits JDK/JRE (e.g. jvm=C:\Program Files\Java\jdk1.5.0_15\jre\bin\server\jvm.dll).
A: 

The fastest and simplest way to runs Tomcat at a 64bit Windows environment is installing the 32Bit JDK. Note: You can install JDK 32Bit after been instaled the JDK 64Bit, no problems will occur and de JDK will be updated.

O caminho mais rápido e simples para rodar o Tomcat em um ambiente Windows 64Bit é instalar o JDK 32Bit. Nota: Você pode instalar JDK 32Bit depois de ter instalado o JDK 64Bit, nenhum problema vai ocorrer e o JDK vai ser atualizado.

eduardolucioac
+2  A: 

According to the changelog since version 6.0.21 the 64-bit components are packaged in the native installer:

Include 64-bit Windows service wrapper in distributions. Update the Windows installer to automatically use the correct binary on 64-bit machines. (markt)

You should need no further configuration.

Robert Munteanu
A: 
@echo off
color 17
title L2JTeon Register GameServer
REM #======================================================================#
REM # You need to set here your JDK/JRE params in case of x64 bits System. #
REM # Remove the "REM" after set PATH variable                             #
REM # If you're not a x64 system user just leave                           # 
REM #======================================================================#
REM set PATH="type here your path to java jdk/jre (including bin folder)"
REM -----------------------------------------------------------------------

@java -Djava.util.logging.config.file=console.cfg -cp c3p0-0.9.1.2.jar;l2jteon.jar;mysql-connector-java-5.1.6-bin.jar net.sf.l2j.gsregistering.GameServerRegister
@pause
памагите нарот ришит сетим
B0oM
+1  A: 

Just wanted to let folks know that when using 64bit tomcat 6, the registry to look at is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\

Note the additional \Wow6432Node\

Thank you for your help!

Xencito