|
From: Lars S. <Lar...@if...> - 2009-11-06 13:19:25
|
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 |
|
From: Lars S. <Lar...@if...> - 2009-11-06 13:29:02
|
One more thing, if I copy the command the wrapper gives to Java in a terminal window my application runs without problems, I mean the output I get from: wrapper.java.command.loglevel=INFO Lars Lars Schnoor 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 > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Leif M. <lei...@ta...> - 2009-11-06 13:29:12
|
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 |
|
From: Lars S. <Lar...@if...> - 2009-11-06 14:38:32
|
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 >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: <Jas...@sc...> - 2009-11-06 15:32:33
|
Hi, This isn't solely related to wrapper processes, but I've had a lot of hassle with Sun's auto-updating mechanism trashing the installed JRE on Windows. You end up with: C:\>java -version Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object It seems to be the fact that I am using the Invocation API (http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html), mostly so that users see "MyProgram.exe" rather than "java.exe" in the task manager. The wrapper calls my executable which parses all arguments similarly to java.exe but creates its own VM. Unfortunately the installer doesn't notice that my program is running and merrily installs, trashing itself in the process. Anyone else suffered similarly? Any known workarounds? Jason Chown Sony Computer Entertainment Europe Limited http://eu.playstation.com ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify pos...@sc... This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** |
|
From: Leif M. <lei...@ta...> - 2009-11-06 20:57:33
|
Jason, The Professional Edition has a way to execute a script before launching the JVM. You could use that opportunity to copy a fresh copy of the java.exe over to MyProgram.exe so you make sure you always have the correct file. I have not played with the auto update feature in the past. How is it triggered? Is it automatic? I would think that any JVMs need to be stopped before updating their files. Is that the case? If I understood how you made use of this a little better, it may be possible to get make the Wrapper support these JVM updates more directly. Cheers, Leif On Sat, Nov 7, 2009 at 12:00 AM, <Jas...@sc...> wrote: > > Hi, > > This isn't solely related to wrapper processes, but I've had a lot of hassle > with Sun's auto-updating mechanism trashing the installed JRE on Windows. > > You end up with: > > C:\>java -version > Error occurred during initialization of VM > java/lang/NoClassDefFoundError: java/lang/Object > > It seems to be the fact that I am using the Invocation API > (http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html), mostly > so that users see "MyProgram.exe" rather than "java.exe" in the task > manager. The wrapper calls my executable which parses all arguments > similarly to java.exe but creates its own VM. Unfortunately the installer > doesn't notice that my program is running and merrily installs, trashing > itself in the process. > > Anyone else suffered similarly? Any known workarounds? > > Jason Chown > Sony Computer Entertainment Europe Limited > http://eu.playstation.com > |
|
From: <Jas...@sc...> - 2009-11-07 00:10:54
|
I have bundled a JRE as a workaround, but wondered if anyone else has come across it. >I have not played with the auto update feature in the past. How is it >triggered? Is it automatic? I'm actually just talking about Java's jusched.exe VM version checker. It's user-triggered, although we got a pretty catastrophic result when our IT department pushed out an update via LANdesk. What's strange is that it installs a new version in a new directory but (since, I think, they added JavaFX) it requires all running Java processes to quit. Trouble is, it doesn't notice my service. Jason Chown Sony Computer Entertainment Europe Limited http://eu.playstation.com ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify pos...@sc... This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** P Please consider the environment before printing this e-mail |
|
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 |
|
From: Lars S. <Lar...@if...> - 2009-11-06 15:47:04
|
Hi Leif I was a bit fast. It works fine on Windows XP (32-bit) and Red Hat 5 (64-bit) but on Ubuntu 9.10 (32-bit) it kills the JVM after the 30 seconds. I have no idea why it works on Red Hat and Windows XP. I will try you suggestion on Ubuntu. Lars Leif Mortenson wrote: > 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 >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Lars S. <Lar...@if...> - 2010-12-16 14:15:16
|
Hi again I am again trying the mentioned scenario, but with the parameters as: wrapper.java.mainclass=special.start.class wrapper.app.parameter.1=-"parameter to special start class" wrapper.app.parameter.2=myStartClass where myStartClass implements WrapperListener. This works fine on Linux (Red Hat Enterprise Linux 5.5 64-bit with Java 1.6.0 Update 22 64-bit). On Windows 7 (64-bit with Java 1.6.0 Update 21 32-bit) it does not work, I get a lot of error messages in the log file about a timeout in waiting for a signal from the JVM. Any help would be greatly appreciated. When I try Integration method #1 I get an exception about that the WrapperSimpleApp can not access a member with modifiers "public static" in the special.start.class. Thanks Lars On 06-11-2009 16:40, Leif Mortenson wrote: > 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 > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: Leif M. <lei...@ta...> - 2010-12-17 08:51:25
|
Lars, Could you please set the wrapper.debug=TRUE property and then post your wrapper.log and wrapper.conf as attachments? I am not sure what would be causing the errors you mentioned, but I should be able to see from the logs. The message about the "public static" is that the WrapperSimpleApp requires that the main class you specify is a public class, and that it defines a public static main method. If either of those is not true then you will not be able to access it. Cheers, Leif On Thu, Dec 16, 2010 at 10:54 PM, Lars Schnoor <Lar...@if...> wrote: > Hi again > > I am again trying the mentioned scenario, but with the parameters as: > wrapper.java.mainclass=special.start.class > wrapper.app.parameter.1=-"parameter to special start class" > wrapper.app.parameter.2=myStartClass > > where myStartClass implements WrapperListener. > This works fine on Linux (Red Hat Enterprise Linux 5.5 64-bit with Java > 1.6.0 Update 22 64-bit). > On Windows 7 (64-bit with Java 1.6.0 Update 21 32-bit) it does not work, > I get a lot of error messages in the log file about a timeout in waiting > for a signal from the JVM. > Any help would be greatly appreciated. > > When I try Integration method #1 I get an exception about that the > WrapperSimpleApp can not access a member with modifiers "public static" > in the special.start.class. > Thanks > > Lars > > On 06-11-2009 16:40, Leif Mortenson wrote: >> 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 |
|
From: Lars S. <Lar...@if...> - 2010-12-17 11:33:23
|
Hi Leif Thanks for the reply, it seems like I had a mistake in my wrapper.conf, so the wrapper.debug=TRUE helped a lot. Now that I can see the command that is used I was wondering why: wrapper.java.command=java in my wrapper.conf results in a command like: "c:\windows\system32\java.exe My problem is that my application now works when I enter the correct path to java.exe as wrapper.java.command, but since the location can be different from system to system I would like to avoid to hard code it, is there away to get the correct path without hard coding it in the wrapper.conf? Thanks Lars On 17-12-2010 09:51, Leif Mortenson wrote: > Lars, > Could you please set the wrapper.debug=TRUE property and then post > your wrapper.log and wrapper.conf as attachments? I am not sure what > would be causing the errors you mentioned, but I should be able to see > from the logs. > > The message about the "public static" is that the WrapperSimpleApp > requires that the main class you specify is a public class, and that > it defines a public static main method. If either of those is not > true then you will not be able to access it. > > Cheers, > Leif > > On Thu, Dec 16, 2010 at 10:54 PM, Lars Schnoor<Lar...@if...> wrote: >> Hi again >> >> I am again trying the mentioned scenario, but with the parameters as: >> wrapper.java.mainclass=special.start.class >> wrapper.app.parameter.1=-"parameter to special start class" >> wrapper.app.parameter.2=myStartClass >> >> where myStartClass implements WrapperListener. >> This works fine on Linux (Red Hat Enterprise Linux 5.5 64-bit with Java >> 1.6.0 Update 22 64-bit). >> On Windows 7 (64-bit with Java 1.6.0 Update 21 32-bit) it does not work, >> I get a lot of error messages in the log file about a timeout in waiting >> for a signal from the JVM. >> Any help would be greatly appreciated. >> >> When I try Integration method #1 I get an exception about that the >> WrapperSimpleApp can not access a member with modifiers "public static" >> in the special.start.class. >> Thanks >> >> Lars >> >> On 06-11-2009 16:40, Leif Mortenson wrote: >>> 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 > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: Leif M. <lei...@ta...> - 2010-12-20 18:02:20
|
Lars, When you set the java command to the following, it will attempt to locate Java on the PATH: wrapper.java.command=java Many systems define a JAVA_HOME variable which will let you do the following: wrapper.java.command=%JAVA_HOME%/bin/java If you application ships with its own JRE, then you can also do something like the following: wrapper.java.command=../jre/bin/java Cheers, Leif On Fri, Dec 17, 2010 at 8:33 PM, Lars Schnoor <Lar...@if...> wrote: > Hi Leif > > Thanks for the reply, it seems like I had a mistake in my wrapper.conf, > so the wrapper.debug=TRUE helped a lot. > Now that I can see the command that is used I was wondering why: > wrapper.java.command=java > in my wrapper.conf results in a command like: > "c:\windows\system32\java.exe > My problem is that my application now works when I enter the correct > path to java.exe as wrapper.java.command, but since the location can be > different from system to system I would like to avoid to hard code it, > is there away to get the correct path without hard coding it in the > wrapper.conf? > Thanks > > Lars > > On 17-12-2010 09:51, Leif Mortenson wrote: >> Lars, >> Could you please set the wrapper.debug=TRUE property and then post >> your wrapper.log and wrapper.conf as attachments? I am not sure what >> would be causing the errors you mentioned, but I should be able to see >> from the logs. >> >> The message about the "public static" is that the WrapperSimpleApp >> requires that the main class you specify is a public class, and that >> it defines a public static main method. If either of those is not >> true then you will not be able to access it. >> >> Cheers, >> Leif >> >> On Thu, Dec 16, 2010 at 10:54 PM, Lars Schnoor<Lar...@if...> wrote: >>> Hi again >>> >>> I am again trying the mentioned scenario, but with the parameters as: >>> wrapper.java.mainclass=special.start.class >>> wrapper.app.parameter.1=-"parameter to special start class" >>> wrapper.app.parameter.2=myStartClass >>> >>> where myStartClass implements WrapperListener. >>> This works fine on Linux (Red Hat Enterprise Linux 5.5 64-bit with Java >>> 1.6.0 Update 22 64-bit). >>> On Windows 7 (64-bit with Java 1.6.0 Update 21 32-bit) it does not work, >>> I get a lot of error messages in the log file about a timeout in waiting >>> for a signal from the JVM. >>> Any help would be greatly appreciated. >>> >>> When I try Integration method #1 I get an exception about that the >>> WrapperSimpleApp can not access a member with modifiers "public static" >>> in the special.start.class. >>> Thanks >>> >>> Lars >>> >>> On 06-11-2009 16:40, Leif Mortenson wrote: >>>> 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 |