|
From: Chris B. <chr...@ya...> - 2004-02-05 19:30:25
|
I'm very close to being able to run my application as a service in WinXP but I'm having an issue. I am replacing one of the standard java classes in java.io with my own version. I place my jar containing this class in the wrapper.java.classpath list in my wrapper.conf but it doesn't appear to recognize it. It seems to work just fine in the console. Any thoughts? --------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online |
|
From: Leif M. <le...@ta...> - 2004-02-05 20:26:33
|
Chris,
In general, that is not something you are supposed to do. But I
assume you
know that. :-)
Normally, the rt.jar jar file is not located on the class path. I
believe it is looked at
before anything else on your classpath (??) I actually would not expect
what you are
doing to work even when running Java manually, so I am not sure why you
are only
having problems running with the Wrapper.
Set the wrapper.debug=true property in your wrapper.conf file. This
will cause
the Wrapper to display the full Java command used to launch the JVM in
the log.
Copy that full command into a fresh batch file. You will need to remove the
-Dwrapper.key property from the command, but other than that you should not
make any changes.
Now try running that script. It should behave exactly as it does
when running
under the Wrapper, only the Wrapper is now out of the equation. You
can then
fiddle with that batch file until you have things working. When you
know what the
problem was it should be easy to make the changes to the wrapper.conf
file to get
things working.
Let me know if you have any questions while doing the above.
Cheers,
Leif
Chris Brundick wrote:
> I'm very close to being able to run my application as a service in
> WinXP but I'm having an issue. I am replacing one of the standard
> java classes in java.io with my own version. I place my jar
> containing this class in the wrapper.java.classpath list in my
> wrapper.conf but it doesn't appear to recognize it. It seems to work
> just fine in the console. Any thoughts?
|
|
From: Chris B. <chr...@ya...> - 2004-02-09 15:20:03
|
Thanks for the reply Leif. I did as you suggested and attempted to run after removing the -Dwrapper.key and it ran just fine. It's only within the wrapper that I appear to have problems. I'm using the -Xbootclasspath:/p option on the java command line to insert my class in front of the standard rt.jar, is it possible that the wrapper has an issue with this? Thank you, Chris Leif Mortenson <le...@ta...> wrote: Chris, In general, that is not something you are supposed to do. But I assume you know that. :-) Normally, the rt.jar jar file is not located on the class path. I believe it is looked at before anything else on your classpath (??) I actually would not expect what you are doing to work even when running Java manually, so I am not sure why you are only having problems running with the Wrapper. Set the wrapper.debug=true property in your wrapper.conf file. This will cause the Wrapper to display the full Java command used to launch the JVM in the log. Copy that full command into a fresh batch file. You will need to remove the -Dwrapper.key property from the command, but other than that you should not make any changes. Now try running that script. It should behave exactly as it does when running under the Wrapper, only the Wrapper is now out of the equation. You can then fiddle with that batch file until you have things working. When you know what the problem was it should be easy to make the changes to the wrapper.conf file to get things working. Let me know if you have any questions while doing the above. Cheers, Leif Chris Brundick wrote: > I'm very close to being able to run my application as a service in > WinXP but I'm having an issue. I am replacing one of the standard > java classes in java.io with my own version. I place my jar > containing this class in the wrapper.java.classpath list in my > wrapper.conf but it doesn't appear to recognize it. It seems to work > just fine in the console. Any thoughts? ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user --------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online |
|
From: Mikko V. <mi...@so...> - 2004-02-09 15:49:23
|
Hello all, I'm new Java Service Wrapper user and I'm running the HSQL Database as a service on my machine with the wrapper. I was wondering how to execute a shutdown command for the database when the service is stopped. As you might know the HSQLDB can be shut down by calling SQL 'SHUTDOWN' command. Now if I write a simple java class which only executes that command through jdbc, then is it possible to set that java class to be called when the hdbc service is stopped? Thanks for any advice, Mikko |
|
From: Mikko V. <mik...@so...> - 2004-02-09 15:56:54
|
Hello all, I'm new Java Service Wrapper user and I'm running the HSQL Database as a service on my machine with the wrapper. I was wondering how to execute a shutdown command for the database when the service is stopped. As you might know the HSQLDB can be shut down by calling SQL 'SHUTDOWN' command. Now if I write a simple java class which only executes that command through jdbc, then is it possible to set that java class to be called when the hdbc service is stopped? Thanks for any advice, Mikko |
|
From: Leif M. <le...@ta...> - 2004-02-09 17:38:40
|
Mikko,
This is precisely what integration method #2, using the
WrapperStartStopApp
helper class was developed for. Take a look at that section of the
integration docs
and post back if you have any other questions.
I use HSQLDB quite a bit, but do so in my own component rather than
running
as a standard server. How does HSQLDB normally get shutdown. If it
does so
using shutdown hooks then the Wrapper will take care of that for you.
Cheers,
Leif
Mikko Valjento wrote:
>Hello all,
>
>I'm new Java Service Wrapper user and I'm running the HSQL Database as a
>service on my machine with the wrapper.
>
>I was wondering how to execute a shutdown command for the database when the
>service is stopped.
>
>As you might know the HSQLDB can be shut down by calling SQL 'SHUTDOWN'
>command. Now if I write a simple java class which only executes that command
>through jdbc, then is it possible to set that java class to be called when
>the hdbc service is stopped?
>
>Thanks for any advice,
>
>Mikko
>
>
|
|
From: Leif M. <le...@ta...> - 2004-02-16 04:36:29
|
Chris, Chris Brundick wrote: > Thanks for the reply Leif. I did as you suggested and attempted to > run after removing the -Dwrapper.key and it ran just fine. It's only > within the wrapper that I appear to have problems. > > I'm using the -Xbootclasspath:/p option on the java command line to > insert my class in front of the standard rt.jar, is it possible that > the wrapper has an issue with this? Playing with the core java classes completely destroys the portability of the program so it is not something that I have ever played with. I am sure you have a reason for doing so though. There are some security related issues that I would expect could arise because the main method is called from the wrapper's helper class which, unless you make it so, is not privileged code. However, as you say that running the same command generated by Wrapper works, I doubt this is the problem. I don't have any ideas on what might be causing this at the moment. Could you enable the wrapper.debug=true property in your conf file and then post the resulting debug output from a single launch of the JVM? I may have some ideas once I have seen the error in context. Cheers, Leif > > */Leif Mortenson <le...@ta...>/* wrote: > > Chris, > In general, that is not something you are supposed to do. But I > assume you > know that. :-) > > Normally, the rt.jar jar file is not located on the class path. I > believe it is looked at > before anything else on your classpath (??) I actually would not > expect > what you are > doing to work even when running Java manually, so I am not sure > why you > are only > having problems running with the Wrapper. > > Set the wrapper.debug=true property in your wrapper.conf file. This > will cause > the Wrapper to display the full Java command used to launch the > JVM in > the log. > Copy that full command into a fresh batch file. You will need to > remove the > -Dwrapper.key property from the command, but other than that you > should not > make any changes. > Now try running that script. It should behave exactly as it does > when running > under the Wrapper, only the Wrapper is now out of the equation. You > can then > fiddle with that batch file until you have things working. When you > know what the > problem was it should be easy to make the changes to the wrapper.conf > file to get > things working. > > Let me know if you have any questions while doing the above. > > Cheers, > Leif > > Chris Brundick wrote: > > > I'm very close to being able to run my application as a service in > > WinXP but I'm having an issue. I am replacing one of the standard > > java classes in java.io with my own version. I place my jar > > containing this class in the wrapper.java.classpath list in my > > wrapper.conf but it doesn't appear to recognize it. It seems to > work > > just fine in the console. Any thoughts? > |