Cannot start service using cygrunsrv

Yasir Khalil Al Masri yalmasri@next.jo
Sat Jan 12 04:43:00 GMT 2002


Hello,

I'm trying to run JBoss with embedded Tomcat under Win2000 server as an 
NT service. I'm using cygrunsrv tool to do that following simple steps;
To install the service I typed this on my command shell:

cygrunsrv --install JBoss --path /cygdrive/d/JBoss-2.2.2_Tomcat-
3.2.2/jboss/bin/run_with_tomcat.bat

"run_with_tomcat.bat" has the following script:

@echo off
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
.\run.bat tomcat

"run.bat" exists in the same directory and look like this:

@echo off
@if not "%ECHO%" == ""  echo %ECHO%
@if "%OS%" == "Windows_NT"  setlocal
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;run.jar
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces_1_4_0.jar
set JAXP=-
Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Documen
tBuilderFactoryImpl
set JAXP=%JAXP% -
Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFact
oryImpl
java %JAXP% -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %1 %2 %3 %4 %
5 %6 %7 %8 %9

The service was installed successfully, but when I tried to start it 
using:

cygrunsrv --start JBoss

I got this error:
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 
1062: The service has not been started.

Can anybody please help me identifying my problem.  If I execute the 
run_with_tomcat.bat, the server runs smoothly, I don't know why it 
couldn't using the cygrunsrv.  I tried to run Tomcat alone using this 
tool, and it worked just fine.

Help is much appreciated.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list