|
From: Jeff H. <je...@je...> - 2003-04-20 21:31:28
|
erf, responding to my own email. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > From: Jeff Howden > > INFO | jvm 1 | 2003/04/20 09:18:35 | java.lang.NoClassDefFoundError: > org/tanukisoftware/wrapper/test/Main ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< fixed this error by changing wrapper.java.mainclass to "org.tanukisoftware.wrapper.WrapperSimpleApp". now the main bat file works correctly (as far as i can tell). so, i ran the install nt service bat file which seemed to run without a hitch. however, now when i try to start the service it fails with an unknown error. any ideas? thanks, .jeff http://evolt.org/ NOTICE: members.evolt.org web and email address are changing! --------------------------------------------------------------------- | OLD: | NEW: | | je...@me... | ev...@je... | | http://members.evolt.org/jeff/ | http://evolt.jeffhowden.com/ | --------------------------------------------------------------------- |
|
From: Jeff H. <je...@je...> - 2003-04-21 09:02:44
|
Leif, ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > From: Leif Mortenson > > No ideas without more info. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< What do you need? ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > The most common problem when running as a service are > caused by differences in the environment between the > SYSTEM user and the user used to run the app in a > console. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< Yeah, I've gathered that from what I've found in the archive that was similar to my problem. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > For example. If you are using the JAVA_HOME environment > variable, make sure that it is available to the SYSTEM > user. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< I thought of that, but I didn't use any environment variables in wrapper.conf. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > In any case, you should be able to see what the problem > is by looking at the wrapper.log file. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< Here's the entire dump of log data that's generated when I start the service. STATUS | wrapper | 2003/04/20 16:53:29 | --> Wrapper Started as Service STATUS | wrapper | 2003/04/20 16:53:30 | Launching a JVM... INFO | jvm 1 | 2003/04/20 16:53:30 | Wrapper (Version 3.0.2) INFO | jvm 1 | 2003/04/20 16:53:30 | INFO | jvm 1 | 2003/04/20 16:53:30 | Starting client... The weird thing is that jar file (status.jar) is definitely being used by the wrapper cause the file is locked, preventing me from overwriting, renaming, or deleting it. However, it's web interface doesn't come up as expected (it basically listens on a specified port and acts as a mini-webserver) when requested in the same manner used when the jar file is executed manually. I check netstat to see what ports the machine is listening on and don't see the port the jar file is configured to listen on. I have a sneaking suspicion that the jar file isn't initializing properly called as a service by the wrapper, but don't know enough about Java to figure out how to isolate and fix it. The few things I do know are that when calling the test batch file (status.bat) it goes through the wrapper initialization sequence and then opens up a Java GUI (spawned by status.jar, the jar file I'm trying to run as a service). The console stays open until I close the Java GUI. If I execute status.jar manually then the GUI doesn't come up the first time. In order to get the GUI to open I have to have the jar file running and then manually execute it again (by double-clicking it). I'm wondering if maybe the GUI opening when using the test batch file (status.bat) and starting it as a service are at all related. Thanks, Jeff ----------------------------------------------------------- Jeff Howden http://jeffhowden.com/ mailto:je...@je... phone://541.913.9261/ ----------------------------------------------------------- Your source for high performance, dynamic site solutions ----------------------------------------------------------- |
|
From: Leif M. <le...@ta...> - 2003-04-21 10:36:37
|
Jeff Howden wrote: >><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< >>In any case, you should be able to see what the problem >>is by looking at the wrapper.log file. >><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< >> >> > >Here's the entire dump of log data that's generated when I start the >service. > >STATUS | wrapper | 2003/04/20 16:53:29 | --> Wrapper Started as Service >STATUS | wrapper | 2003/04/20 16:53:30 | Launching a JVM... >INFO | jvm 1 | 2003/04/20 16:53:30 | Wrapper (Version 3.0.2) >INFO | jvm 1 | 2003/04/20 16:53:30 | >INFO | jvm 1 | 2003/04/20 16:53:30 | Starting client... > If it gets to this point and then never times out then your application is most likely running as far as the Wrapper is concerned. Could you post the log file again with wrapper.logfile.loglevel=DEBUG set? That kicks out more useful information and will usually help to pin down exactly what is happening. Also attach your wrapper.conf file. >The weird thing is that jar file (status.jar) is definitely being used by >the wrapper cause the file is locked, preventing me from overwriting, >renaming, or deleting it. > That means that the JVM has opened and is using the status.jar file. This will happen even when not using the Wrapper. > However, it's web interface doesn't come up as >expected (it basically listens on a specified port and acts as a >mini-webserver) when requested in the same manner used when the jar file is >executed manually. I check netstat to see what ports the machine is >listening on and don't see the port the jar file is configured to listen on. > It sounds like you are using an executable Jar? With the Wrapper and the WrapperSimpleApp helper class, you have to specify the main class from the jar's manifest as the first argument passed to the WrapperSimpleApp. If you have configured this incorrectly then there should be no difference between running in console mode and as a service however. >I have a sneaking suspicion that the jar file isn't initializing properly >called as a service by the wrapper, but don't know enough about Java to >figure out how to isolate and fix it. The few things I do know are that >when calling the test batch file (status.bat) it goes through the wrapper >initialization sequence and then opens up a Java GUI (spawned by status.jar, >the jar file I'm trying to run as a service). The console stays open until >I close the Java GUI. If I execute status.jar manually then the GUI doesn't >come up the first time. In order to get the GUI to open I have to have the >jar file running and then manually execute it again (by double-clicking it). >I'm wondering if maybe the GUI opening when using the test batch file >(status.bat) and starting it as a service are at all related. > From what I read here, it sounds like your application is acting a bit strangely even without the Wrapper. The debug info above should be able to peg or rule out the Wrapper as the cause however. Cheers, Leif |
|
From: Leif M. <le...@ta...> - 2003-04-21 08:28:51
|
Jeff, >now the main bat file works >correctly (as far as i can tell). so, i ran the install nt service bat file >which seemed to run without a hitch. however, now when i try to start the >service it fails with an unknown error. any ideas? > No ideas without more info. The most common problem when running as a service are caused by differences in the environment between the SYSTEM user and the user used to run the app in a console. For example. If you are using the JAVA_HOME environment variable, make sure that it is available to the SYSTEM user. In any case, you should be able to see what the problem is by looking at the wrapper.log file. This will usually be in the location configured in your wrapper.conf file. If the wrapper.conf file can not be located for some reason then the Wrapper will output to a wrapper.log file located in the same directory as the Wrapper.exe binary. Cheers, Leif |