|
From: Leif M. <le...@ta...> - 2009-11-06 15:40:46
|
Lars, If the WrapperManager is not initialized, then the Wrapper will kill the JVM by default after 30 seconds or so. Have you disabled any of the default timeouts? If so, all of the freeze detection code will not be working. Have you tried using Integration method #1? It lets you do codeless integration. If your special.start.class is designed to run as a normal standalone Java main class then following will work: wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.app.parameter.1=special.start.class wrapper.app.parameter.2=-"parameter to special start class" wrapper.app.parameter.3=myStartClass See the following documentation for more details: http://wrapper.tanukisoftware.org/doc/english/integrate-simple-win.html Cheers, Leif On Fri, Nov 6, 2009 at 11:37 PM, Lars Schnoor <Lar...@if...> wrote: > Hi Leif > Thanks for the quick reply. I changed the wrapper parameters like you > suggested and now it works. > The special.start.class does not implement WrapperListener or initialize the > WrapperManager, but it works anyway. > I did not make the special.start.class myself, so I can't make implement the > WrapperListener. > > Lars > > Leif Mortenson wrote: > > Lars, > All versions of the Wrapper actually expect that you correctly break > the parameters into individual parameters. On Windows they are all > reconstructed into a single line so it works, but on UNIX, the command > is broken up into the individual components and passed to the system > as an array. > > You need to do the following and it will work on all platforms: > > wrapper.java.mainclass=special.start.class > wrapper.app.parameter.1=-"parameter to special start class" > wrapper.app.parameter.1=myStartClass > > The class you specify for the wrapper.java.mainclass must implement > the WrapperListener and initialize the WrapperManager class directly > or indirectly. You are using what we call Integration Method #3. > Please read over the following page and let me know if you have any > additional questions. > http://wrapper.tanukisoftware.org/doc/english/integrate-listener.html > > Cheers, > Leif > > > On Fri, Nov 6, 2009 at 10:18 PM, Lars Schnoor <Lar...@if...> wrote: > > > Hi > I have a Java application that is started in a special way. I have a main > class in my application that implements the WrapperListener interface. > from the command prompt I can start my application with: > java -cp myApplication.jar special.start.class -"parameter to special start > class" myStartClass > I can start my application by the above line on both Windows and Linux. > > On Windows I put the following line in my wrapper.conf: > wrapper.java.mainclass=special.start.class -"parameter to special start > class" myStartClass > And it works fine. > > On Linux (Red Hat Enterprise Linux 5 64-bit) I tried the same, putting the > same line in the wrapper.conf: > wrapper.java.mainclass=special.start.class -"parameter to special start > class" myStartClass > Here it does not work, I get an ClassNotFoundException for the class: > special.start.class -"parameter to special start class" myStartClass > For me it seems as if the wrapper on Linux sees special.start.class > -"parameter to special start class" myStartClass as one class, where the > wrapper on Windows starts the special.start.class with -"parameter to > special start class" myStartClass as parameters. > I tried putting: > wrapper.java.mainclass=special.start.class > wrapper.app.parameter.1=-"parameter to special start class" myStartClass > in the wrapper.conf and with this the wrapper starts, but since the > special.start.class does not implement the WrapperListener interface, the > wrapper shuts down after five tries. > Any idea how I can get it to work on Linux, I am using version 3.2.3 of the > wrapper? > Thanks in advance! > > Lars |