|
From: Leif M. <le...@ta...> - 2009-07-28 14:31:20
|
Lars, To solve this problem exactly, the Wrapper is very strict about always settings its working directory to the location of the Wrapper binary. This is the case on all platforms. This is done precisely so that you can reliably use paths relative to the wrapper binary's location. If you need to use another location for your application, you can use the following property to do so. Be sure to read its documentation carefully first though. http://wrapper.tanukisoftware.org/doc/english/prop-working-dir.html Let me know if this helps. Cheers, Leif On Tue, Jul 28, 2009 at 11:11 PM, Lars Schnoor<Lar...@if...> wrote: > Hi Leif > > I have come a bit closer to a solution. I can now start the service with the > batch file. I can also start my application when I copy the command line > into a command prompt window AND my command prompt window is in the > directory where the service is located, if I try to execute the command line > from a different location I get the ClassNotFoundException. > Is there a way to ensure that the service is started from the location where > the service is located? I mean the classes can only be found if they are > present and the classpath is relative to the current location. > > Lars > > Leif Mortenson wrote: > > Lars, > Please add the following property to your configuration. It will > cause the full generated command line to be logged. > wrapper.java.command.loglevel=INFO > This will let you see exactly how the Wrapper is launching the JVM. > > If you wish, you can copy that command line into a batch script or sh > file. Then, IMPORTANT, remove the wrapper.key property from the > command line. This will let you run the JVM in a semi-standalone mode > which should let you test the JVM without the Wrapper binary in the > equation. The java side of the Wrapper will still be there. This > mode is not usually all that useful, but it can be helpful in removing > doubt about the Wrapper binary causing certain problems. > > I may be able to help more if you post the resulting command line > along with your error. Where are the classes referenced by your > custom class loader coming from? Are you getting a > ClassNotFoundException on a Wrapper class, one of your application > classes, or a system class? > > Cheers, > Leif > > On Tue, Jul 28, 2009 at 9:52 PM, Lars Schnoor<Lar...@if...> wrote: > > > Hi Leif > > I am trying to use a custom class loader which I am trying to point out with > the -Djava.system.class.loader= parameter. > I get an ClassNotFoundException when I try to start the service. When I put > the -Djava.system.class.loader= directly after the java command in a command > prompt windows it works. > Where is the wrapper.java.additional.1= placed in the command line? > > Thanks > > Lars > > Leif Mortenson wrote: > > Lars, > What is the error you are getting. It should work identically to a > standalone Java application. The only difference is that you will > also need to make sure that the Wrapper's class files are loaded. > > Please describe a little more what you are trying to do as well as > what you are seeing. > > Cheers, > Leif > > On Tue, Jul 28, 2009 at 9:29 PM, Lars Schnoor<Lar...@if...> wrote: > > > Hi > I am using the wrapper version 3.2.3 on Windows and I need to add a > -Djava.system.class.loader=... parameter in order to start my service, > how do I do that? > I tried to add it as: > wrapper.java.additional.1= -Djava.system.class.loader=.... > But that does not work. > Thanks > > Lars |