You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joseph Freemaker <jo...@yahoo.com> on 2007/06/17 19:17:03 UTC

Cannot get service.bat to work with Tomcat 5.5 on Windows

Hi,

Installed Tomcat 5.5 and all worked fine with jdk 1.5.0_07. However need for installer purposes to be able to setup Tomcat as a Windows service by running a service.bat file. Have done the following:


1. Removed the original Tomcat service with 'tomcat5 //DS//Tomcat5'. The Tomcat service was removed.


2. Run the following (from Tomcat's bin directory) in a Windows batch file and Tomcat is installed as a Windows service:

set args=%args% --DisplayName="Tomcat 5.5"
set args=%args% --Install="C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" 
set args=%args% --Jvm=auto 
set args=%args% --StartMode=jvm 
set args=%args% --StopMode=jvm 
set args=%args% --StartClass=org.apache.catalina.startup.Bootstrap 
set args=%args% --StartParams=start 
set args=%args% --StopClass=org.apache.catalina.startup.Bootstrap 
set args=%args% --StopParams=stop 

echo %args%

tomcat5 //IS//Tomcat55 %args%


3. When Tomcat is now started as a Windows service from either the Windows Services window or by using 'net start tomcat55' the service will not start. No Tomcat logs are produced in the Tomcat logs directory. The Windows event log reports 'The Tomcat 5.5 service terminated with service-specific error 0 (0x0).'

Any suggestions or does anyone have a service.bat file that works? Need to also enhance the above to specify when using an installer the jdk that Tomcat should use with usage of the --JavaHome parameter in the service.bat file.

Thanks,

Joseph.  







      ___________________________________________________________________________________
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

Re: Cannot get service.bat to work with Tomcat 5.5 on Windows

Posted by Mladen Turk <ml...@gmail.com>.
Joseph Freemaker wrote:
> 
> 2. Run the following (from Tomcat's bin directory) in a Windows batch file and Tomcat is installed as a Windows service:
> 
> set args=%args% --DisplayName="Tomcat 5.5"
> set args=%args% --Install="C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe" 
> set args=%args% --Jvm=auto 
> set args=%args% --StartMode=jvm 
> set args=%args% --StopMode=jvm 
> set args=%args% --StartClass=org.apache.catalina.startup.Bootstrap 
> set args=%args% --StartParams=start 
> set args=%args% --StopClass=org.apache.catalina.startup.Bootstrap 
> set args=%args% --StopParams=stop 
> 
> echo %args%
> 
> tomcat5 //IS//Tomcat55 %args%
>

What this has to do with service.bat script?
Are you having problems using service.bat or your own script?

And BTW, look at the original service.bat
It has additional //US// params for things like -Dcatalina.base and -Dcatalina.home

Regards,
Mladen.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org