|
From: Leif M. <le...@ta...> - 2003-10-08 23:49:42
|
Russell,
You made a common mistake. The mainclass is the class that is loaded
when java is first loaded. This will be your class if and only if you have
manually implemented the WrapperListener interface, which you have not.
I tried to warn about this in the default wrapper.conf file that comes with
version 3.0.5.
Please go back and read the integration documentation. You will most
likely want to use Method #1 and set the mainclass to be WrapperSimpleApp
http://wrapper.tanukisoftware.org/doc/english/integrate.html
Post back if you still have problems.
By the way, I replied to the wrapper-user list as that is where this
post
should have gone. The wrapper-cvs list is only monitored by people who
want to keep track of changes to the wrapper source, or who have
comments on the changes.
Cheers,
Leif
Russell Rice wrote:
>G'day!
>
> I'm attempting to get Wrapper to run (first as a application then as a
>service) with a Java RMI Server app I've created. It's not working, however.
>It will start the JVM, after about 30 seconds, saying it timed out waiting for
>signal from JVM. The thing is, during that 30 seconds, the app is actually
>running.
>
> Here's what I've got:
>
>#Wrapper.conf
>wrapper.java.command=java
>wrapper.java.mainclass=com.mariner.reporting.reportServer
>wrapper.java.classpath.1=../lib/wrapper.jar
>wrapper.java.classpath.2=../lib/reportServer.jar
>wrapper.java.classpath.3=../lib/jxl.jar
>wrapper.java.library.path.1=../lib
>wrapper.java.additional.1=-
>Djava.rmi.server.codebase=file:/c:\JavaStuff\Analyzer_Web\Server\wrapper\lib\rep
>ortServer.jar
>wrapper.java.initmemory=3
>wrapper.java.maxmemory=64
>wrapper.app.parameter.1=
>wrapper.console.format=PM
>wrapper.console.loglevel=DEBUG
>wrapper.logfile=../logs/reportServer.log
>wrapper.logfile.format=LPTM
>wrapper.logfile.loglevel=DEBUG
>wrapper.logfile.maxsize=0
>wrapper.logfile.maxfiles=0
>wrapper.syslog.loglevel=NONE
>wrapper.ntservice.name=reportServer
>wrapper.ntservice.displayname=Java Financial Report Server
>wrapper.ntservice.description=Java financial reporting server - The back-end of
>the java tool to run various reports
>wrapper.ntservice.dependency.1=
>wrapper.ntservice.starttype=AUTO_START
>wrapper.ntservice.interactive=false
>
>################################################################################
>###
>
>#reportServer.java
>package com.mariner.reporting;
>
>import java.net.*;
>import java.rmi.*;
>import java.rmi.registry.*;
>import java.rmi.server.*;
>
>public class reportServer extends UnicastRemoteObject implements reportRemote {
> private static Process p = null;
> private static reportGenerator rpt;
> String[] results = null;
> boolean isReportReady = false;
> private static Thread runner = null;
>
> public String[] genReport() throws RemoteException {
> rpt = new reportGenerator();
> results = rpt.genReport();
> rpt = null;
> return results;
> }
>
> public reportServer() throws RemoteException {
> }
>
> public static void main(String[] args) {
> try {
> Runtime.getRuntime().addShutdownHook( new Thread()
> {
> public void run() {
> p.destroy();
> }
> } );
> p = Runtime.getRuntime().exec("rmiregistry 2020");
> reportServer rs = new reportServer();
> Naming.bind("//ricer-desktop:2020/reportServer", rs);
> } catch (Exception e) {
> System.out.println("Error -- " + e.toString());
> e.printStackTrace();
> }
> }
>}
>
>#################################################################
>
>Everything looks straightforward to me. I can run the app from a commandline:
> Set CLASSPATH=
> java -cp reportServer.jar;jxl.jar -
>Djava.rmi.server.codebase=file:/c:\JavaStuff\Analyzer_Web\Server\wrapper\lib\rep
>ortServer.jar com.mariner.reporting.reportServer
>
>I believe I have the options set up correctly. Below is the log file
>
>#################################################################
>
>#reportServer.log
>STATUS | wrapper | 2003/10/03 14:25:20 | --> Wrapper Started as Console
>DEBUG | wrapperp | 2003/10/03 14:25:20 | server listening on port 32000.
>STATUS | wrapper | 2003/10/03 14:25:21 | Launching a JVM...
>DEBUG | wrapper | 2003/10/03 14:25:21 | command: "C:\WINDOWS\system32
>\java.exe" -
>Djava.rmi.server.codebase=file:/c:\JavaStuff\Analyzer_Web\Server\wrapper\lib\rep
>ortServer.jar -Xms3m -Xmx64m -Djava.library.path="../lib" -
>classpath "../lib/wrapper.jar;../lib/reportServer.jar;../lib/jxl.jar" -
>Dwrapper.key="Y7SNOfdzOseD9iCv" -Dwrapper.port=32000 -Dwrapper.debug="TRUE" -
>Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 com.mariner.reporting.reportServer
>DEBUG | wrapper | 2003/10/03 14:25:21 | Java Virtual Machine started
>(PID=2736)
>ERROR | wrapper | 2003/10/03 14:25:52 | Startup failed: Timed out waiting for
>signal from JVM.
>ERROR | wrapper | 2003/10/03 14:25:52 | Java Virtual Machine did not exit on
>request, terminated
>DEBUG | wrapper | 2003/10/03 14:25:52 | JVM was only running for 31 seconds
>leading to a failed restart count of 1.
>
>#############################################################
>
>I also took the command listed above and it runs fine at the command prompt.
>
>Any ideas out there? (and if there's anything I missed, feel free to ask)
>
>Thanks in advance!
>
>---
>Russell Rice
>Essbase Database Administrator
>Mariner Health Care, Inc.
>
>
|