|
From: Leif M. <lei...@ta...> - 2008-11-19 15:53:27
|
Mark, I believe the problem is the value of the -product parameter. The original java command had the value "com.lawson.help.branding.branding" But in your wrapper.conf file, it has the value "C:/eclipse/plugins/com.lawson.help.branding". The rest looks Ok. This appears to be designed to run on Windows, so it will most likely work. But please note that the parameters to the Java application must be correctly broken up. As you have written things, this will not work on a UNIX platform. You should be coding the parameters as follows: wrapper.app.parameter.1=org.eclipse.help.standalone.Infocenter wrapper.app.parameter.2=-command wrapper.app.parameter.3=start wrapper.app.parameter.4=-eclipsehome wrapper.app.parameter.5=C:/Eclipse wrapper.app.parameter.6=-port wrapper.app.parameter.7=7090 wrapper.app.parameter.8=-data wrapper.app.parameter.9=c:/infocenter/7090_7099_saas/7090_current/infocenter wrapper.app.parameter.10=-product wrapper.app.parameter.11=com.lawson.help.branding.branding wrapper.app.parameter.12=-configuration wrapper.app.parameter.13=c:/infocenter/7090_7099_saas/7090_current/config This is necessary because the UNIX platforms execute a process with the arguments preparsed into an array. If you combine them as you were doing then the they would be passed as is to the main method of your Java process. Cheers, Leif On Wed, Nov 19, 2008 at 4:59 AM, Mark Ludwig <mar...@us...> wrote: > > I'm trying to use the Java Service Wrapper to create a Windows service for > an Eclipse InfoCenter, but I can't get it to work. > > I can start the InfoCenter with the following at a command line: > java -classpath C:\Eclipse\plugins\org.eclipse.help.base_*.jar > org.eclipse.help.standalone.Infocenter > -command start -eclipsehome C:\Eclipse -port 7090 -data > c:\infocenter\7090_7099_saas\7090_current\infocenter > -product com.lawson.help.branding.branding -configuration > c:\infocenter\7090_7099_saas\7090_current\config > > I set up the wrapper config file as follows: > > #******************************************************************** > # Wrapper Java Properties > #******************************************************************** > wrapper.java.command=java > > wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp > > wrapper.java.classpath.1=../lib/wrapper.jar > wrapper.java.classpath.2=C:/eclipse/plugins/org.eclipse.help.base_3.2.2.R322_v20061207.jar > > wrapper.java.library.path.1=../lib > > wrapper.port=32500 > > wrapper.app.parameter.1=org.eclipse.help.standalone.Infocenter > wrapper.app.parameter.2="-command start" > wrapper.app.parameter.3="-eclipsehome C:/Eclipse" > wrapper.app.parameter.4="-port 7090" > wrapper.app.parameter.5="-data > c:/infocenter/7090_7099_saas/7090_current/infocenter" > wrapper.app.parameter.6="-product > C:/eclipse/plugins/com.lawson.help.branding" > wrapper.app.parameter.7="-configuration > c:/infocenter/7090_7099_saas/7090_current/config" > > #******************************************************************** > # Wrapper Logging Properties > #******************************************************************** > # Format of output for the console. (See docs for formats) > wrapper.console.format=PM > wrapper.console.loglevel=INFO > > wrapper.logfile=../logs/wrapperSaas.log > wrapper.logfile.format=LPTM > wrapper.logfile.loglevel=DEBUG > wrapper.logfile.maxsize=0 > wrapper.logfile.maxfiles=0 > > # Log Level for sys/event log output. (See docs for log levels) > wrapper.syslog.loglevel=NONE > > #******************************************************************** > # Wrapper Windows Properties > #******************************************************************** > # Title to use when running as a console > wrapper.console.title=Test Wrapper Sample Application > > #******************************************************************** > # Wrapper Windows NT/2000/XP Service Properties > #******************************************************************** > # WARNING - Do not modify any of these properties when an application > # using this configuration file has been installed as a service. > # Please uninstall the service before modifying this section. The > # service can then be reinstalled. > > wrapper.ntservice.name=infocenter_saas_current > > # Display name of the service > wrapper.ntservice.displayname=SaaS Infocenter - Current > > # Description of the service > wrapper.ntservice.description=Infocenter for Current SaaS Operations > > # Service dependencies. Add dependencies as needed starting from 1 > wrapper.ntservice.dependency.1= > > # Mode in which the service is installed. AUTO_START or DEMAND_START > wrapper.ntservice.starttype=AUTO_START > > # Allow the service to interact with the desktop. > wrapper.ntservice.interactive=false > > However, when I try to start the service from the Windows Computer > Management tool, a java.exe starts up and then quits, and I get the > following in error log: > > STATUS | wrapper | 2008/11/18 11:55:58 | --> Wrapper Started as Service > STATUS | wrapper | 2008/11/18 11:55:58 | Java Service Wrapper Community > Edition 3.3.1 > STATUS | wrapper | 2008/11/18 11:55:58 | Copyright (C) 1999-2008 Tanuki > Software, Inc. All Rights Reserved. > STATUS | wrapper | 2008/11/18 11:55:58 | > http://wrapper.tanukisoftware.org > STATUS | wrapper | 2008/11/18 11:55:58 | > DEBUG | wrapper | 2008/11/18 11:55:58 | Using tick timer. > DEBUG | wrapperp | 2008/11/18 11:55:58 | server listening on port 32500. > DEBUG | wrapper | 2008/11/18 11:55:58 | Ping settings: > wrapper.ping.interval=5, wrapper.ping.interval.logged=1, > wrapper.ping.timeout=30 > STATUS | wrapper | 2008/11/18 11:55:58 | Launching a JVM... > DEBUG | wrapper | 2008/11/18 11:55:58 | command: > "C:\WINDOWS\system32\java.exe" -Djava.library.path="../lib" -classpath > "../lib/wrapper.jar;C:/eclipse/plugins/org.eclipse.help.base_3.2.2.R322_v20061207.jar" > -Dwrapper.key="XTH0fLp9SVG9x_cr" -Dwrapper.port=32500 > -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 > -Dwrapper.debug="TRUE" -Dwrapper.pid=32044 -Dwrapper.version="3.3.1" > -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" > -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 > org.tanukisoftware.wrapper.WrapperSimpleApp > org.eclipse.help.standalone.Infocenter "-command start" "-eclipsehome > C:/Eclipse" "-port 7090" "-data > c:/infocenter/7090_7099_saas/7090_current/infocenter" "-product > C:/eclipse/plugins/com.lawson.help.branding" "-configuration > c:/infocenter/7090_7099_saas/7090_current/config" > DEBUG | wrapper | 2008/11/18 11:55:58 | JVM started (PID=31256) > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > WrapperManager class initialized by thread: main Using classloader: > sun.misc.Launcher$AppClassLoader@11b86e7 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager: Initializing... > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: JVM #1 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Running a > 32-bit JVM. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Registering > shutdown hook > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Using > wrapper > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Load native > library. One or more attempts may fail if platform specific libraries do > not exist. This is NORMAL and is only a problem if they all fail. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Unable to > load native library: wrapper-windows-x86-32.dll Cause: no > wrapper-windows-x86-32 in java.library.path > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Loaded > native library: wrapper.dll > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Calling > native initialization method. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperJNI Debug: Initializing > WrapperManager native library. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperJNI Debug: Java Executable: > C:\WINDOWS\system32\java.exe > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperJNI Debug: Windows version: > 5.2.3790 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Java Version > : 1.6.0_07-b06 Java HotSpot(TM) Client VM > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Java VM > Vendor : Sun Microsystems Inc. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: OS Name > : Windows 2003 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: OS Arch > : x86 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Control > event monitor thread started. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Startup > runner thread started. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@16a55fa, > args["-command start", "-eclipsehome C:/Eclipse", "-port 7090", "-data > c:/infocenter/7090_7099_saas/7090_current/infocenter", "-product > C:/eclipse/plugins/com.lawson.help.branding", "-configuration > c:/infocenter/7090_7099_saas/7090_current/config"]) called by thread: main > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > Communications runner thread started. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Open socket > to wrapper...Wrapper-Connection > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Failed > attempt to bind using local port 31000 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Opened > Socket from 31001 to 32500 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Send a > packet KEY : XTH0fLp9SVG9x_cr > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > handleSocket(Socket[addr=/127.0.0.1,port=32500,localport=31001]) > DEBUG | wrapperp | 2008/11/18 11:55:59 | accepted a socket from 127.0.0.1 > on port 31001 > DEBUG | wrapperp | 2008/11/18 11:55:59 | read a packet KEY : > XTH0fLp9SVG9x_cr > DEBUG | wrapper | 2008/11/18 11:55:59 | Got key from JVM: XTH0fLp9SVG9x_cr > DEBUG | wrapperp | 2008/11/18 11:55:59 | send a packet LOW_LOG_LEVEL : 1 > DEBUG | wrapperp | 2008/11/18 11:55:59 | send a packet PING_TIMEOUT : 30 > DEBUG | wrapperp | 2008/11/18 11:55:59 | send a packet PROPERTIES : > (Property Values) > DEBUG | wrapper | 2008/11/18 11:55:59 | Start Application. > DEBUG | wrapperp | 2008/11/18 11:55:59 | send a packet START : start > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Received a > packet LOW_LOG_LEVEL : 1 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: LowLogLevel > from Wrapper is 1 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Received a > packet PING_TIMEOUT : 30 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: PingTimeout > from Wrapper is 30000 > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Received a > packet PROPERTIES : (Property Values) > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Received a > packet START : start > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: calling > WrapperListener.start() > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Waiting for > WrapperListener.start runner thread to complete. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > WrapperListener.start runner thread started. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperSimpleApp Debug: > start(args) Will wait up to 2 seconds for the main method to complete. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperSimpleApp Debug: invoking > main method > INFO | jvm 1 | 2008/11/18 11:55:59 | Parameters syntax: > INFO | jvm 1 | 2008/11/18 11:55:59 | > INFO | jvm 1 | 2008/11/18 11:55:59 | -command start | shutdown | > [update command [update parameters]] [-eclipsehome eclipseInstallPath] > [-host helpServerHost] [-port helpServerPort] [-adminId administratorUserId] > [-adminPassword administratorPassword] [-trustStoreLocation > trustStoreLocation] [-trustStorePassword trustStorePassword][-noexec] > [platform options] [-vmargs [Java VM arguments]] > INFO | jvm 1 | 2008/11/18 11:55:59 | > INFO | jvm 1 | 2008/11/18 11:55:59 | where: > INFO | jvm 1 | 2008/11/18 11:55:59 | eclipseInstallPath specifies > Eclipse installation directory; this directory is a parent to "plugins" > directory and eclipse executable; the option must be provided, when current > directory from which infocenter is launched, is not the same as Eclipse > installation directory, > INFO | jvm 1 | 2008/11/18 11:55:59 | helpServerHost specifies host > name of the interface that help server will use, > INFO | jvm 1 | 2008/11/18 11:55:59 | helpServerPort specifies port > number that help server will use, > INFO | jvm 1 | 2008/11/18 11:55:59 | administratorUserId specifies the > administrator user id to use when secure access is enabled > INFO | jvm 1 | 2008/11/18 11:55:59 | administratorPassword specifies > the administrator password to use when secure access is enabled > INFO | jvm 1 | 2008/11/18 11:55:59 | trustStoreLocation specifies the > location of the truststore file to use when secure access is enabled > INFO | jvm 1 | 2008/11/18 11:55:59 | trustStorePassword specifies the > password of the truststore file when secure access is enabled > INFO | jvm 1 | 2008/11/18 11:55:59 | noexec option indicates that > Eclipse executable should not be used, > INFO | jvm 1 | 2008/11/18 11:55:59 | platform options are other > options that are supported by Eclipse Executable, > INFO | jvm 1 | 2008/11/18 11:55:59 | update command is one of install, > update, enable, disable, uninstall, search, listFeatures, addSite, > removeSite, or apply, > INFO | jvm 1 | 2008/11/18 11:55:59 | update parameters are -featureId, > -version, -from, -to, -verifyOnly as required by update commands used. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperSimpleApp Debug: main > method completed > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperSimpleApp Debug: > start(args) end. Main Completed=true, exitCode=null > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > WrapperListener.start runner thread stopped. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: returned > from WrapperListener.start() > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Send a > packet STARTED : > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Startup > runner thread stopped. > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: ShutdownHook > started > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: > WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Send a > packet STOP : 0 > DEBUG | wrapperp | 2008/11/18 11:55:59 | read a packet STARTED : > DEBUG | wrapper | 2008/11/18 11:55:59 | JVM signalled that it was started. > DEBUG | wrapperp | 2008/11/18 11:55:59 | read a packet STOP : 0 > DEBUG | wrapper | 2008/11/18 11:55:59 | JVM requested a shutdown. (0) > DEBUG | wrapper | 2008/11/18 11:55:59 | wrapperStopProcess(0) called. > DEBUG | wrapper | 2008/11/18 11:55:59 | Sending stop signal to JVM > DEBUG | wrapperp | 2008/11/18 11:55:59 | send a packet STOP : NULL > INFO | jvm 1 | 2008/11/18 11:55:59 | WrapperManager Debug: Received a > packet STOP : > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: Thread, > Wrapper-Shutdown-Hook, handling the shutdown process. > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: calling > listener.stop() > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperSimpleApp Debug: stop(0) > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: returned > from listener.stop() -> 0 > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: > shutdownJVM(0) Thread:Wrapper-Shutdown-Hook > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: Send a > packet STOPPED : 0 > DEBUG | wrapperp | 2008/11/18 11:56:00 | read a packet STOPPED : 0 > DEBUG | wrapper | 2008/11/18 11:56:00 | JVM signalled that it was stopped. > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: Closing > socket. > INFO | jvm 1 | 2008/11/18 11:56:00 | WrapperManager Debug: Closed > socket: java.net.SocketException: socket closed > DEBUG | wrapperp | 2008/11/18 11:56:00 | socket read no code (closed?). > INFO | jvm 1 | 2008/11/18 11:56:01 | WrapperManager Debug: Server > daemon shut down > INFO | jvm 1 | 2008/11/18 11:56:01 | WrapperManager Debug: ShutdownHook > complete > DEBUG | wrapper | 2008/11/18 11:56:01 | JVM process exited with a code of > 0, leaving the wrapper exit code set to 0. > DEBUG | wrapper | 2008/11/18 11:56:01 | JVM exited normally. > STATUS | wrapper | 2008/11/18 11:56:01 | <-- Wrapper Stopped > > > > Does anyone see any obvious errors in what I have done or is this approach > not doable? I should be getting an additional java process, > but that doesn't happen when I try to start the service. I get two java > processes when I start from the command line or a bat file. > > Thanks for any help anyone can give, > > Mr. Mark Ludwig > Sr. Technical Communicator, Global Information Development > _____________________________ > Lawson Software > 380 St. Peter Street > St. Paul, MN 55102 > Tel: 651-767-6424 > http://www.lawson.com > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > -- Leif Mortenson President Tanuki Software, Ltd. 6-16-7-1001 Nishi-Kasai, Edogawa-ku Tokyo 134-0088 Japan Tel/Fax: +81-3-3878-0415 http://www.tanukisoftware.com lei...@ta... |