tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhijit Mazumder" <abhij...@talentica.com>
Subject Service started by tomcat terminates after a while
Date Wed, 28 Dec 2005 12:49:11 GMT
I am using tomcat5.exe to start my java application as a Windows service.
After starting it exits automatically after some time. But the same
application run from command prompt gives no problem.

 

Tomcat: Jakarta-tomcat-5.0.30

Jdk: j2sdk1.4.2_03

 

I am attaching the bat file below I am using to start my application as
service.

 

Thanks,

Abhijit

 

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

 

set pmContext=prod

set oPort=5501

set tName=XYZ%pmContext%%oPort%

set PR_DISPLAYNAME=%tName%

 

set XYZ_HOME=D:\XYZ

 

set JAVA_HOME=D:\j2sdk1.4.2_03

rem set jreHome=%JAVA_HOME%\jre\bin\client

rem set APACHE_HOME=%XYZ_HOME%\Apache2

set CATALINA_HOME=%XYZ_HOME%\jakarta-tomcat-5.0.30

set contextHome=%XYZ_HOME%\contexts\%pmContext%

set PATH=%path%;%java_home%\bin;%XYZ_HOME%\lib;D:\xaserver\xalib

rem %CATALINA_HOME%\bin;

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

 

set PR_INSTALL=%EXECUTABLE%

set PR_LOGPATH=%CATALINA_HOME%\logs

set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll

 

cd /d %CATALINA_HOME%\bin

 

set
PR_CLASSPATH=%PR_CLASSPATH%;%contextHome%;%XYZ_HOME%\jsp\WEB-INF\lib\classes
12_01.jar

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\classes12.jar

set
PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\commons-beanutils.jar

set
PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\commons-collections.j
ar

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\jakarta-oro.jar

set
PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\commons-logging.jar

set
PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\commons-logging-api.j
ar

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\classes

set
PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\XAOptimizerStandalone
.jar

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\XYZ.jar

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\j2ee.jar

set PR_CLASSPATH=%PR_CLASSPATH%;%XYZ_HOME%\jsp\WEB-INF\lib\plugin.jar

 

 

set servOptions=%servOptions% --JvmOptions
"-Dcatalina.home=%CATALINA_HOME%;-DXYZ.modelRunner.logLevel=5;-DXYZ.home=%XY
Z_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"

set servOptions=%servOptions% --JvmMs 128 --JvmMx 512 

set servOptions=%servOptions% --StartPath
"%XYZ_HOME%\jsp\WEB-INF\lib;%PATH%"

set servOptions=%servOptions% --StartMode jvm --StopMode jvm  

set servOptions=%servOptions% --StartClass XYZ.modelRunner.ModelRunnerDaemon

set servOptions=%servOptions% --StartParams "-t;%tName%;-p;%oPort%;start"

set servOptions=%servOptions% --StopClass XYZ.modelRunner.ShutDown
--StopParams "%oPort%;stop"

set servOptions=%servOptions% --StdOutput
"%XYZ_HOME%\logs\%pmContext%-%oPort%_stdout.log"

set servOptions=%servOptions% --StdError
"%XYZ_HOME%\logs\%pmContext%-%oPort%_stderr.log"

 

"%EXECUTABLE%" //IS//%tName%  --Description "Optimizer for XYZ 5.0"
--StartClass org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop

 

"%EXECUTABLE%" //US//%tName% %servOptions% --Startup=auto 

 

rem net start "%tName%" 

 

"%EXECUTABLE%" //RS//%tName% 

 

pause 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message