Adding -Djava.system.class.loader=... parameter?

View: New views
9 Messages — Rating Filter:   Alert me  

Adding -Djava.system.class.loader=... parameter?

by Lars Schnoor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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<Lars.Schnoor@...> 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

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Lars Schnoor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 SchnoorLars.Schnoor@... 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
    

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
  

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Lars Schnoor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 SchnoorLars.Schnoor@... 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 SchnoorLars.Schnoor@... 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
    

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
  

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Leif Mortenson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Lars Schnoor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif

I actually don't want to use a different working directory. My jar-file is in the same directory as the Wrapper.exe file and it all works fine except the -Djava.system.class.loader= parameter, which seems to ignore the working directory and just takes the current directory as working directory.
I get the ClassNotFoundException for my class loader when I try to start the service from a location that is different from the location where the Wrapper.exe is located.
So the question is how to the the classpath for the -Djava.system.class.loader= parameter?

Lars
 
Leif Mortenson wrote:
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 SchnoorLars.Schnoor@... 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 SchnoorLars.Schnoor@... 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 SchnoorLars.Schnoor@... 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
    

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
  

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Leif Mortenson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lars,
When you run under the Wrapper, it changes the working directory of
the current process (itself) to the location of the Wrapper.exe.
Then when the Wrapper launches the JVM, its working directory will
also be the location of the wrapper.exe because the child process
inherits that from its parent.

If you run without the wrapper using the the command line from the
log, the setting of the working directory will not take place.

Please explain to me exactly what your class loader is doing, I might
have some ideas.  If you want to explain it off list we can to that as
well.  I just want to keep the final solution on list so it can be
searched later by others with similar problems.

Cheers,
Leif

On Tue, Jul 28, 2009 at 11:45 PM, Lars Schnoor<Lars.Schnoor@...> wrote:

> Hi Leif
>
> I actually don't want to use a different working directory. My jar-file is
> in the same directory as the Wrapper.exe file and it all works fine except
> the -Djava.system.class.loader= parameter, which seems to ignore the working
> directory and just takes the current directory as working directory.
> I get the ClassNotFoundException for my class loader when I try to start the
> service from a location that is different from the location where the
> Wrapper.exe is located.
> So the question is how to the the classpath for the
> -Djava.system.class.loader= parameter?
>
> Lars
>
> Leif Mortenson wrote:
>
> 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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user

Re: Adding -Djava.system.class.loader=... parameter?

by Lars Schnoor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Leif

The Java classes are encrypted and the custom class loader decrypts the
class files. The custom class loader is part of the main jar file that
contains the Java class that is started by the service. Originally I was
using Method 1 to start the service class, but with the
-Djava.system.class.loader= parameter that did not work. I then tried to
start my service class directly by setting the wrapper.java.mainclass
parameter equal to my service class, which I guess is Method 3. I can
get my service started that way, but get some error messages from the
service wrapper after a few seconds about some JVM not being initialized
properly.

I think my problem with getting it to work with Method 1 is that the
-Djava.system.class.loader= is used for starting the
org.tanukisoftware.wrapper.WrapperSimpleApp class but not by the
org.tanukisoftware.wrapper.WrapperSimpleApp class to start my service
class.

I use the -Djava.system.class.loader= parameter to point out the class
loader class, which is part of my main jar file. I am thinking that when
Java starts and gets the -Djava.system.class.loader= parameter it does
not know where to find the class since I am getting the
ClassNotFoundException for the class loader class.

I will try a different approach of wrapping the launch of the service in
a wrapper class that takes care of loading the class loader.

Lars

Leif Mortenson wrote:

> Lars,
> When you run under the Wrapper, it changes the working directory of
> the current process (itself) to the location of the Wrapper.exe.
> Then when the Wrapper launches the JVM, its working directory will
> also be the location of the wrapper.exe because the child process
> inherits that from its parent.
>
> If you run without the wrapper using the the command line from the
> log, the setting of the working directory will not take place.
>
> Please explain to me exactly what your class loader is doing, I might
> have some ideas.  If you want to explain it off list we can to that as
> well.  I just want to keep the final solution on list so it can be
> searched later by others with similar problems.
>
> Cheers,
> Leif
>
> On Tue, Jul 28, 2009 at 11:45 PM, Lars Schnoor<Lars.Schnoor@...> wrote:
>  
>> Hi Leif
>>
>> I actually don't want to use a different working directory. My jar-file is
>> in the same directory as the Wrapper.exe file and it all works fine except
>> the -Djava.system.class.loader= parameter, which seems to ignore the working
>> directory and just takes the current directory as working directory.
>> I get the ClassNotFoundException for my class loader when I try to start the
>> service from a location that is different from the location where the
>> Wrapper.exe is located.
>> So the question is how to the the classpath for the
>> -Djava.system.class.loader= parameter?
>>
>> Lars
>>
>> Leif Mortenson wrote:
>>
>> 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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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<Lars.Schnoor@...> 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
>>    
>
> ------------------------------------------------------------------------------
> 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
> Wrapper-user@...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>  

------------------------------------------------------------------------------
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
Wrapper-user@...
https://lists.sourceforge.net/lists/listinfo/wrapper-user