|
From: Franck T. <fta...@gm...> - 2006-05-26 14:51:25
|
Hi David, You were right, I set the classpath to ../classes and parameter to monitor.Ping and everything is wotking fine. Thank you Franck On 5/25/06, David Hayes <da...@sm...> wrote: > > If you run: > > > > java =96classpath=3D../classes/monitor ping > > > > from the directory where PingMonitor.bat is located, what is your result? > This should cause Java to attempt to load the ping class the same way tha= t > the wrapper will. If you are returning the same error as in the wrapper, > then your problem lies not directly within the Wrapper itself. > > > > My guess, is that ping is a member of the package monitor. As such, you > shouldn't be setting your classpath to ../classes/monitor, but instead to > simply ../classes, and setting the wrapper.app.parameter.1=3Dmonitor.ping= . > > > > Hope this helps Franck, > > > > David > > > ------------------------------ > > *From:* wra...@li... [mailto: > wra...@li...] *On Behalf Of *Franck TAPSOBA > *Sent:* 25 May 2006 16:26 > *To:* wra...@li... > *Subject:* [Wrapper-user] Wrapper Configuration > > > > Hi guys, > > I have a problem configuring my wrapper.conf file. > > Here is the message i got : > > > *C:\winSer\Monitor\bin>PingMonitor.bat** > wrapper | --> Wrapper Started as Console > wrapper | Launching a JVM... > jvm 1 | Wrapper (Version 3.2.0) **http://wrapper.tanukisoftware.org*<h= ttp://wrapper.tanukisoftware.org/> > *jvm 1 |** > jvm 1 | WrapperSimpleApp: Unable to locate the class ping.class: > java.lang.ClassNotFoundException: ping.class > jvm 1 | > jvm 1 | WrapperSimpleApp Usage: > jvm 1 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} > [app_parameters] > jvm 1 | > jvm 1 | Where: > jvm 1 | app_class: The fully qualified class name of the > application to run. > jvm 1 | app_parameters: The parameters that would normally be passed > to the > jvm 1 | application. > wrapper | <-- Wrapper Stopped > Press any key to continue . . .* > > > Here is my wrapper.conf file: > > *#********************************************************************** > # Wrapper Properties > #******************************************************************** > # Java Application > wrapper.java.command=3Djava * > > *# Java Main class. This class must implement the WrapperListener > interface** > # or guarantee that the WrapperManager class is initialized. Helper > # classes are provided to do this for you. See the Integration section > # of the documentation for details. > wrapper.java.mainclass=3Dorg.tanukisoftware.wrapper.WrapperSimpleApp* > > *# Java Classpath (include wrapper.jar) Add class path elements as** > # needed starting from 1 > wrapper.java.classpath.1=3D../lib/wrapper.jar > wrapper.java.classpath.2 =3D../classes/monitor* > > > *# Java Library Path (location of Wrapper.DLL or libwrapper.so)** > wrapper.java.library.path.1=3D../lib* > > *# Java Additional Parameters** > #wrapper.java.additional.1=3D* > > *# Initial Java Heap Size (in MB)** > #wrapper.java.initmemory=3D3* > > *# Maximum Java Heap Size (in MB)** > #wrapper.java.maxmemory=3D64* > > *# Application parameters. Add parameters as needed starting from 1** > wrapper.app.parameter.1=3Dping.class* > > *#********************************************************************** > # Wrapper Logging Properties > #******************************************************************** > # Format of output for the console. (See docs for formats) > wrapper.console.format=3DPM* > > *# Log Level for console output. (See docs for log levels)** > wrapper.console.loglevel=3DINFO* > > *# Log file to use for wrapper output logging.** > wrapper.logfile=3D../logs/wrapper.log* > > *# Format of output for the log file. (See docs for formats)** > wrapper.logfile.format=3DLPTM* > > *# Log Level for log file output. (See docs for log levels)** > wrapper.logfile.loglevel=3DINFO* > > *# Maximum size that the log file will be allowed to grow to before** > # the log is rolled. Size is specified in bytes. The default value > # of 0, disables log rolling. May abbreviate with the 'k' (kb) or > # 'm' (mb) suffix. For example: 10m =3D 10 megabytes. > wrapper.logfile.maxsize=3D0* > > *# Maximum number of rolled log files which will be allowed before old** > # files are deleted. The default value of 0 implies no limit. > wrapper.logfile.maxfiles=3D0* > > *# Log Level for sys/event log output. (See docs for log levels)** > wrapper.syslog.loglevel=3DNONE* > > *#********************************************************************** > # Wrapper Windows Properties > #******************************************************************** > # Title to use when running as a console > wrapper.console.title=3DPing Monitor* > > *#********************************************************************** > # 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.* > > *# Name of the service** > wrapper.ntservice.name=3DPing Monitor* > > *# Display name of the service** > wrapper.ntservice.displayname=3DPing Monitor* > > *# Description of the service** > wrapper.ntservice.description=3DPing Monitor monitors given IP addresses = by > pinging them to check if they are up* > > *# Service dependencies. Add dependencies as needed starting from 1** > wrapper.ntservice.dependency.1=3D* > > *# Mode in which the service is installed. AUTO_START or DEMAND_START** > wrapper.ntservice.starttype=3DAUTO_START* > > *# Allow the service to interact with the desktop.** > wrapper.ntservice.interactive=3Dfalse* > > When i launch my app.bat (PingMonitor.bat) I always got the exception > ClassnotFoundException due to the fact the wrapper can not get my > application class. My application directory is as follow : > > *Monitor** > * || > ||=3D=3D=3D>*classes** > * || || > || ||=3D=3D=3D>*monitor* (contains ping.class) > || > ||=3D=3D=3D>*bin* (contains wrapper.exe and and all .bat files) > || > ||=3D=3D=3D>*conf* (contains wrapper.conf) > > Thank you for your help > > Franck > > > > > > > |