|
From: Jimmy C. <ji...@te...> - 2003-10-28 15:31:02
|
Hi Leif,
Thanks for your help. I turned on the debug mode and it was true that
windows didn't find my app. I re-set my environment variable stuffs in
the conf file and it works.
Thank you!
Jimmy Chu
-----Original Message-----
From: Leif Mortenson [mailto:le...@ta...]=20
Sent: Monday, October 27, 2003 10:30 PM
To: wra...@li...
Subject: Re: [Wrapper-user] Launching but not starting a service
Jimmy,
From the error message, by guess is that the java executable is not=20
being found
when run as a service. The way to quickly solve problems like this is=20
to set the
wrapper.debug=3Dtrue property and attempt to start your service again. =
In most
cases, it will then be obvious what the problem is. If you could post=20
the resulting
DEBUG output from a single invocation of the Wrapper, I should be able
to tell you what the problem is.
Make sure that the JAVA_HOME and JWrapperPath environment variables
have been defined as system level environment variables.
Cheers,
Leif
Jimmy Chu wrote:
>Hi,
>
>I followed the example of implementing the wrapperListener interface. I
>tested it first in console mode and experienced no problem (The wrapper
>created the instance, started it, and finally stopped it). Then I=20
>registered it as service using -i flag and started it using the -t=20
>flag. But when I started the service, it gave me the error message of:
>
>wrapper | Starting the Jimmy Chu Sample Application service... wrapper
>| The Jimmy Chu Sample Application service was launched, but failed to
>start.
>
>Any help is greatly appreciated!
>
>My sample app. is as followed:
>
>//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D myApp.java =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>import org.tanukisoftware.wrapper.WrapperManager;
>import org.tanukisoftware.wrapper.WrapperListener;
>
>public class myApp implements WrapperListener {
>=09
> public myApp() {
> System.out.println("Creating me...");
> }
>=09
> public Integer start( String[] args ) {
> System.out.println("I am starting");
> return null;
> }
>=09
> public int stop( int exitCode ) {
> System.out.println("I am stopping");
> return exitCode;
> }
>
> public void controlEvent( int event )
> {
> if (WrapperManager.isControlledByNativeWrapper()) {
> // The Wrapper will take care of this event
> } else {
> // We are not being controlled by the Wrapper, so
> // handle the event ourselves.
> if ((event =3D=3D WrapperManager.WRAPPER_CTRL_C_EVENT) ||
> (event =3D=3D WrapperManager.WRAPPER_CTRL_CLOSE_EVENT) =
||
> (event =3D=3D =
WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT)){
> WrapperManager.stop(0);
> }
> }
> }
>
> public static void main(String[] args) {
> WrapperManager.start( new myApp(), args);
> }
>}
>
>#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dwrapper.conf=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>wrapper.java.command=3D%JAVA_HOME%/bin/java
>wrapper.java.mainclass=3DmyApp wrapper.java.classpath.1=3D./wrapper.jar
>wrapper.java.classpath.2=3D.
>wrapper.java.library.path.1=3D%JWrapperPath%/lib
>wrapper.java.initmemory=3D3
>wrapper.java.maxmemory=3D64
>
>wrapper.ntservice.name=3DTESTINGMYAPP
>wrapper.ntservice.displayname=3DJimmy Chu Sample Application=20
>wrapper.ntservice.description=3DJimmy Chu Service Description
>
>Jimmy Chu
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: The SF.net Donation Program. Do you=20
>like what SourceForge.net is doing for the Open Source Community? Make
>a contribution, and help us add new features and functionality. Click=20
>here: http://sourceforge.net/donate/=20
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> =20
>
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you
like what SourceForge.net is doing for the Open Source Community? Make
a contribution, and help us add new features and functionality. Click
here: http://sourceforge.net/donate/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|