Hi,

 

I defined my library path in the Catalina.bat under Windows 2000 and if I start the startup.bat Tomcat 5.0.16 works fine with the connected libraries.

 

Now I made a Windows 2000 service of Tomcat, but can't it find my libraries anymore.

I used the install script which has been posted earlier by Bill Barker (included).

The script is working fine for starting Tomcat, but without the library. I changed one of the last lines into:

 

"%EXECUTABLE%" //US//%SERVICE_NAME% --JavaOptions -Dcatalina.home="\"%CATALINA_HOME%\"" -Djava.library.path="\"%CATALINA_BASE%\webapps\brs\"" -Djava.endorsed.dirs="\"%CATALINA_HOME%\common\endorsed\"" -Xrs --StdOutputFile "%CATALINA_HOME%\logs\stdout.log" --StdErrorFile "%CATALINA_HOME%\logs\stderr.log" --WorkingPath "%CATALINA_HOME%\bin"

 

(in the mail it maybe be more lines, but it is actually 1)

The result is that I can't start the service anymore.

 

Any ideas on what can be the problem?

 

Thanks in advance,

Alexander

_______________________________

Alexander van Bruchem

Windows System Engineer

ISD - N.V. Organon

P.O. Box 20

5340 BH Oss

The Netherlands

Ext.: +31 (0) 412 665076

mailto:[EMAIL PROTECTED]

 

--------------------------------------------------------------------

This message, including attached files, may contain confidential

information and is intended only for the use by the individual

and/or the entity to which it is addressed. Any unauthorized use,

dissemination of, or copying of the information contained herein is

not allowed and may lead to irreparable harm and damage for which

you may be held liable. If you receive this message in error or if

it is intended for someone else please notify the sender by

returning this e-mail immediately and delete the message.

--------------------------------------------------------------------

@echo off
if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem NT Service Install/Uninstall script
rem
rem Options
rem install                Install the service using Tomcat5 as service name.
rem                        Service is installed using default settings.
rem remove                 Remove the service from the System.
rem
rem name        (optional) If the second argument is present it is considered
rem                        to be new service name                                      
     
rem
rem $Id: service.bat,v 1.3 2003/12/24 04:40:43 billbarker Exp $
rem ---------------------------------------------------------------------------

rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
if not "%CATALINA_HOME%" == "" goto gotHome
set CATALINA_HOME=%cd%
if exist "%CATALINA_HOME%\bin\tomcat.exe" goto okHome
rem CD to the upper dir
cd ..
set CATALINA_HOME=%cd%
:gotHome
if exist "%CATALINA_HOME%\bin\tomcat.exe" goto okHome
echo The tomcat.exe was not found...
echo The CATALINA_HOME environment variable is not defined correctly.
echo This environment variable is needed to run this program
goto end
:okHome

set EXECUTABLE=%CATALINA_HOME%\bin\tomcat.exe

rem Set default Service name
set SERVICE_NAME=Tomcat5

if "%1" == "" goto displayUsage
if "%2" == "" goto setServiceName
set SERVICE_NAME=%2
:setServiceName
if %1 == install goto doInstall
if %1 == remove goto doRemove
echo Unknown parameter "%1"
:displayUsage
echo 
echo Usage: service.bat install/remove [service_name]
goto end

:doRemove
rem Remove the service
"%EXECUTABLE%" //DS//%SERVICE_NAME%
echo The service '%SERVICE_NAME%' has been removed
goto end

:doInstall
rem Install the service
"%EXECUTABLE%" //IS//%SERVICE_NAME% --DisplayName "Apache Tomcat" --Description 
"Apache Tomcat Server - http://jakarta.apache.org/tomcat/";  --Install "%EXECUTABLE%" 
--ImagePath "%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar" 
--StartupClass org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass 
org.apache.catalina.startup.Bootstrap;main;stop --Java java --Startup manual
rem Set extra parameters
"%EXECUTABLE%" //US//%SERVICE_NAME% --JavaOptions 
-Dcatalina.home="\"%CATALINA_HOME%\""#-Djava.endorsed.dirs="\"%CATALINA_HOME%\common\endorsed\""#-Djava.io.tmpdir="\"%CATALINA_HOME%\temp\""#-Dbuild.compiler.emacs=true#-Xms32m#-Xmx256m#-Xrs
 --StdOutputFile "%CATALINA_HOME%\logs\stdout.log" --StdErrorFile 
"%CATALINA_HOME%\logs\stderr.log" --WorkingPath "%CATALINA_HOME%\bin"
echo The service '%SERVICE_NAME%' has been installed

:end
cd %CURRENT_DIR%

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to