From: David H. <da...@sm...> - 2006-05-26 03:42:04
|
If you run: java -classpath=../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 that 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=monitor.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/> http://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=java # 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=org.tanukisoftware.wrapper.WrapperSimpleApp # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=../lib/wrapper.jar wrapper.java.classpath.2 =../classes/monitor # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=../lib # Java Additional Parameters #wrapper.java.additional.1= # Initial Java Heap Size (in MB) #wrapper.java.initmemory=3 # Maximum Java Heap Size (in MB) #wrapper.java.maxmemory=64 # Application parameters. Add parameters as needed starting from 1 wrapper.app.parameter.1=ping.class #******************************************************************** # Wrapper Logging Properties #******************************************************************** # Format of output for the console. (See docs for formats) wrapper.console.format=PM # Log Level for console output. (See docs for log levels) wrapper.console.loglevel=INFO # Log file to use for wrapper output logging. wrapper.logfile=../logs/wrapper.log # Format of output for the log file. (See docs for formats) wrapper.logfile.format=LPTM # Log Level for log file output. (See docs for log levels) wrapper.logfile.loglevel=INFO # 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 = 10 megabytes. wrapper.logfile.maxsize=0 # 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=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=Ping 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=Ping Monitor # Display name of the service wrapper.ntservice.displayname=Ping Monitor # Description of the service wrapper.ntservice.description=Ping 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= # 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 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 || ||===>classes || || || ||===>monitor (contains ping.class) || ||===>bin (contains wrapper.exe and and all .bat files) || ||===>conf (contains wrapper.conf) Thank you for your help Franck |