From: Leif M. <le...@ta...> - 2006-05-31 01:37:40
|
Bill, > I'm trying to use v3.2 of the Java Service Wrapper and have run into > an issue that I can't seem to get past. Here is my wrapper.conf file: <snip most of config file as it is fine with the following exception> > # Log Level for log file output. (See docs for log levels) > wrapper.logfile.loglevel=FINEST There is no such log level. The Wrapper will default to DEBUG in this case. > Here is the output that is produced from the log when I attempt to > install and run the service: > > DEBUG | wrapper | 2006/05/30 11:32:16 | Service command: "C:\Program > Files\VCS Server\wrapper.exe" -s wrapper.conf > STATUS | wrapper | 2006/05/30 11:32:17 | VCS installed. > STATUS | wrapper | 2006/05/30 11:32:23 | --> Wrapper Started as Service > DEBUG | wrapper | 2006/05/30 11:32:23 | Using tick timer. > DEBUG | wrapperp | 2006/05/30 11:32:23 | server listening on port 32000. > DEBUG | wrapper | 2006/05/30 11:32:23 | Classpath element, > wrapper.java.classpath.2 , does not exist: C:\Program Files\VCS > Server\wrappertesta.jar > STATUS | wrapper | 2006/05/30 11:32:23 | Launching a JVM... > DEBUG | wrapper | 2006/05/30 11:32:23 | command: > "C:\WINDOWS\system32\java.exe" - Duser.timezone=UTC > -Duser.dir="C:\Program Files\VCS Server" -Xms128m -Xmx256m > -Djava.library.path="C:\Program Files\VCS Server\vcsNative" -classpath > "C:\Program Files\VCS Server\wrapper.jar;C:\Program Files\VCS > Server\wrappertesta.jar;C:\Program Files\VCS Server\ImageServer.jar" - > Dwrapper.key="xEe2o3phm7_2ayOo" -Dwrapper.port=32000 > -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 > -Dwrapper.debug="TRUE" -Dwrapper.pid=640 -Dwrapper.version="3.2.0" > -Dwrapper.native_library= "wrapper" -Dwrapper.service="TRUE" > -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 > org.tanukisoftware.wrapper.WrapperSimpleApp ImageServerDEBUG | > wrapper | 2006/05/30 11:32:23 | JVM started (PID=3952) > INFO | jvm 1 | 2006/05/30 11:32:23 | > java.lang.NoClassDefFoundError: > org/tanukisoftware/wrapper/WrapperSimpleAppINFO | jvm 1 | > 2006/05/30 11:32:23 | Exception in thread "main" > DEBUG | wrapper | 2006/05/30 11:32:23 | JVM process exited with a > code of 1, setting the wrapper exit code to 1. > ERROR | wrapper | 2006/05/30 11:32:23 | JVM exited while loading the > application. > DEBUG | wrapper | 2006/05/30 11:32:23 | JVM was only running for 0 > seconds leading to a failed restart count of 1. > DEBUG | wrapper | 2006/05/30 11:32:23 | Waiting 5 seconds before > launching another JVM. This result is strange. Your classpath: "C:\Program Files\VCS Server\wrapper.jar;C:\Program Files\VCS Server\wrappertesta.jar;C:\Program Files\VCS Server\ImageServer.jar" looks fine. The wrappertesta.jar file does not appear to exist as the warning in the log states, but I assume that you just changed the name to try skipping it. The main class org.tanukisoftware.wrapper.WrapperSimpleApp is also correct and should be located in the wrapper.jar file. Because you say that it works correctly when run as a console app, that means that the wrapper.jar file is most likely not corrupted in any way. My next guess would be that the JVM is having difficulties reading the jar for some reason. I have seen cases in the past where users have protected directories to access only by specific user accounts. In your case, you are not specifying a particular account to run the service as so it is being run by the SYSTEM account. If you have restricted access to that directory then it may be possible that the account you are logged in as can see the jar files, but that the SYSTEM account can not. > Running as a console produces this output: <snip console output all looks fine for a normal app> This first line of the log is odd though. What OS version are you running? > wrapper | Attempt to set the console title failed: The handle is invalid. (0x6) This is Windows XP sp2? > jvm 1 | Windows version: 5.1.2600 Googling on this didn't turn up anything. Most programs I saw that call the SetConsoleTitle method appear to ignore the return value and would thus not notice an error... The method doesn't take a handle directly but must be referring to a handle located using the current process id. How exactly are you launching the wrapper when you run it in a console? Are you running the bat script from within an open command prompt? Double clicking on the batch script in the file explorer? Or something else? Knowing what you are doing could help me to track down what is going on here. At any rate this isn't directly causing you any problems other than that the console window is not having its title set correctly. > There was no file wrapper-windows-x86-32.dll included in the zip file > I downloaded. Am I missing something? There is a wrapper.dll file > which I copied to my native directory. I assume you are concerned about the following from the logs: jvm 1 | Load native library. One or more attempts may fail if platform specific libraries do not exist. jvm 1 | Loading native library failed: wrapper-windows-x86-32.dll Cause: java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-32 in java.library.path jvm 1 | Loaded native library: wrapper.dll This is normal operation. As of 3.2, the Wrapper has the ability to load in its native library based on platform specific naming. The delta-pack distribution of the Wrapper takes advantage of this feature by providing wrapper binaries for all supported platforms. The Wrapper first attempts to load the platform specific dll, then falls back to loading the default dll. Cheers, Leif |