You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(13) |
Nov
(16) |
Dec
(29) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(38) |
Feb
(51) |
Mar
(51) |
Apr
(115) |
May
(82) |
Jun
(30) |
Jul
(50) |
Aug
(68) |
Sep
(57) |
Oct
(160) |
Nov
(80) |
Dec
(78) |
| 2004 |
Jan
(71) |
Feb
(75) |
Mar
(108) |
Apr
(87) |
May
(79) |
Jun
(70) |
Jul
(69) |
Aug
(39) |
Sep
(52) |
Oct
(47) |
Nov
(50) |
Dec
(32) |
| 2005 |
Jan
(22) |
Feb
(122) |
Mar
(46) |
Apr
(76) |
May
(31) |
Jun
(51) |
Jul
(61) |
Aug
(70) |
Sep
(37) |
Oct
(46) |
Nov
(57) |
Dec
(83) |
| 2006 |
Jan
(55) |
Feb
(81) |
Mar
(51) |
Apr
(67) |
May
(77) |
Jun
(43) |
Jul
(106) |
Aug
(64) |
Sep
(47) |
Oct
(64) |
Nov
(60) |
Dec
(12) |
| 2007 |
Jan
(50) |
Feb
(93) |
Mar
(49) |
Apr
(56) |
May
(40) |
Jun
(63) |
Jul
(40) |
Aug
(47) |
Sep
(54) |
Oct
(37) |
Nov
(54) |
Dec
(37) |
| 2008 |
Jan
(35) |
Feb
(39) |
Mar
(26) |
Apr
(14) |
May
(23) |
Jun
(51) |
Jul
(43) |
Aug
(26) |
Sep
(29) |
Oct
(31) |
Nov
(24) |
Dec
(16) |
| 2009 |
Jan
(21) |
Feb
(30) |
Mar
(74) |
Apr
(26) |
May
(26) |
Jun
(43) |
Jul
(23) |
Aug
(23) |
Sep
(15) |
Oct
(27) |
Nov
(37) |
Dec
(10) |
| 2010 |
Jan
(16) |
Feb
(28) |
Mar
(16) |
Apr
(45) |
May
(8) |
Jun
(68) |
Jul
(45) |
Aug
(44) |
Sep
(51) |
Oct
(7) |
Nov
(20) |
Dec
(21) |
| 2011 |
Jan
(14) |
Feb
(17) |
Mar
(7) |
Apr
(7) |
May
(48) |
Jun
(23) |
Jul
(5) |
Aug
(33) |
Sep
(22) |
Oct
(14) |
Nov
(14) |
Dec
(5) |
| 2012 |
Jan
|
Feb
(10) |
Mar
(12) |
Apr
(51) |
May
(10) |
Jun
(8) |
Jul
(14) |
Aug
(22) |
Sep
(9) |
Oct
(24) |
Nov
(14) |
Dec
(13) |
| 2013 |
Jan
(12) |
Feb
(4) |
Mar
(14) |
Apr
(19) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(10) |
Sep
(4) |
Oct
(11) |
Nov
(13) |
Dec
(2) |
| 2014 |
Jan
(3) |
Feb
(14) |
Mar
(5) |
Apr
(10) |
May
(10) |
Jun
(11) |
Jul
(10) |
Aug
(3) |
Sep
(13) |
Oct
(22) |
Nov
(14) |
Dec
(32) |
| 2015 |
Jan
(8) |
Feb
(2) |
Mar
(17) |
Apr
(1) |
May
(24) |
Jun
|
Jul
(4) |
Aug
|
Sep
(9) |
Oct
(9) |
Nov
(5) |
Dec
(2) |
| 2016 |
Jan
(8) |
Feb
(6) |
Mar
(6) |
Apr
(9) |
May
(3) |
Jun
(2) |
Jul
(7) |
Aug
(6) |
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
| 2017 |
Jan
(9) |
Feb
(8) |
Mar
(6) |
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
(10) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
|
| 2018 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
(3) |
Aug
(2) |
Sep
(9) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2019 |
Jan
(9) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
|
Jul
(7) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2021 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Leif M. <le...@ta...> - 2007-04-21 01:29:48
|
Aparna,
I answered you on the 12th. Did you miss the reply? See attached.
Cheers,
Leif
Aparna Khade wrote:
>
> Could anyone please help me with this.
>
> Thanks,
> Aparna
>
> _____________________________________________
> *From: * Aparna Khade
> *Sent: * Friday, April 06, 2007 3:57 PM
> *To: * 'wra...@li...'
> *Subject: * Need information regarding
> "wrapper.ntservice.starttype"
>
> Hi,
> I understand that the configuration property:
> wrapper.ntservice.starttype can take either AUTO_START or DEMAND_START
> values.
>
> I set it to AUTO_START, but, when installed, my application does not
> start automatically.
> Does the machine need to be restarted for the application to be
> started automatically?
>
> Thanks,
> Aparna
>
|
|
From: Aparna K. <ap...@da...> - 2007-04-20 17:17:27
|
This will definitely help me. Thanks. -----Original Message----- From: Andr=E9 Schild [mailto:a.s...@aa...]=20 Sent: Friday, April 20, 2007 1:09 PM To: wra...@li... Subject: Re: [Wrapper-user]Need informationregarding = "wrapper.ntservice.starttype" Aparna Khade schrieb: > Thanks for your response. > Is there any configuration parameter that can be set to install the = application as a windows service and start it right away? > =20 I don't know. But usually executing "net start servicename" does start the service. Andr=E9 > Thanks, > Aparna > > -----Original Message----- > From: Andr=E9 Schild [mailto:a.s...@aa...] > Sent: Friday, April 20, 2007 1:04 PM > To: wra...@li... > Subject: Re: [Wrapper-user] Need informationregarding = "wrapper.ntservice.starttype" > > Hello, > > AUTO_START means that the service is automatically started when the = machine boots. > > Andr=E9 > > Aparna Khade schrieb: > =20 >> Could anyone please help me with this. >> >> Thanks, >> Aparna >> >> _____________________________________________ >> *From: * Aparna Khade >> *Sent: * Friday, April 06, 2007 3:57 PM >> *To: * 'wra...@li...' >> *Subject: * Need information regarding=20 >> "wrapper.ntservice.starttype" >> >> Hi, >> I understand that the configuration property:=20 >> wrapper.ntservice.starttype can take either AUTO_START or=20 >> DEMAND_START values. >> >> I set it to AUTO_START, but, when installed, my application does not=20 >> start automatically. >> Does the machine need to be restarted for the application to be=20 >> started automatically? >> >> Thanks, >> Aparna >> >> --------------------------------------------------------------------- >> - >> -- >> >> --------------------------------------------------------------------- >> - >> --- This SF.net email is sponsored by DB2 Express Download DB2=20 >> Express C - the FREE version of DB2 express and take control of your=20 >> XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> --------------------------------------------------------------------- >> - >> -- >> >> _______________________________________________ >> Wrapper-user mailing list >> Wra...@li... >> https://lists.sourceforge.net/lists/listinfo/wrapper-user >> =20 >> =20 > > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by DB2 Express Download DB2 Express = > C - the FREE version of DB2 express and take control of your XML. No = limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by DB2 Express Download DB2 Express = > C - the FREE version of DB2 express and take control of your XML. No=20 > limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > =20 -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - = the FREE version of DB2 express and take control of your XML. No limits. = Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: <a.s...@aa...> - 2007-04-20 17:08:51
|
Aparna Khade schrieb: > Thanks for your response. > Is there any configuration parameter that can be set to install the application as a windows service and start it right away? > I don't know. But usually executing "net start servicename" does start the service. André > Thanks, > Aparna > > -----Original Message----- > From: André Schild [mailto:a.s...@aa...] > Sent: Friday, April 20, 2007 1:04 PM > To: wra...@li... > Subject: Re: [Wrapper-user] Need informationregarding "wrapper.ntservice.starttype" > > Hello, > > AUTO_START means that the service is automatically started when the machine boots. > > André > > Aparna Khade schrieb: > >> Could anyone please help me with this. >> >> Thanks, >> Aparna >> >> _____________________________________________ >> *From: * Aparna Khade >> *Sent: * Friday, April 06, 2007 3:57 PM >> *To: * 'wra...@li...' >> *Subject: * Need information regarding >> "wrapper.ntservice.starttype" >> >> Hi, >> I understand that the configuration property: >> wrapper.ntservice.starttype can take either AUTO_START or DEMAND_START >> values. >> >> I set it to AUTO_START, but, when installed, my application does not >> start automatically. >> Does the machine need to be restarted for the application to be >> started automatically? >> >> Thanks, >> Aparna >> >> ---------------------------------------------------------------------- >> -- >> >> ---------------------------------------------------------------------- >> --- This SF.net email is sponsored by DB2 Express Download DB2 Express >> C - the FREE version of DB2 express and take control of your XML. No >> limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> ---------------------------------------------------------------------- >> -- >> >> _______________________________________________ >> Wrapper-user mailing list >> Wra...@li... >> https://lists.sourceforge.net/lists/listinfo/wrapper-user >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Aparna K. <ap...@da...> - 2007-04-20 17:06:45
|
Thanks for your response. Is there any configuration parameter that can be set to install the = application as a windows service and start it right away? Thanks, Aparna=20 -----Original Message----- From: Andr=E9 Schild [mailto:a.s...@aa...]=20 Sent: Friday, April 20, 2007 1:04 PM To: wra...@li... Subject: Re: [Wrapper-user] Need informationregarding = "wrapper.ntservice.starttype" Hello, AUTO_START means that the service is automatically started when the = machine boots. Andr=E9 Aparna Khade schrieb: > > Could anyone please help me with this. > > Thanks, > Aparna > > _____________________________________________ > *From: * Aparna Khade > *Sent: * Friday, April 06, 2007 3:57 PM > *To: * 'wra...@li...' > *Subject: * Need information regarding=20 > "wrapper.ntservice.starttype" > > Hi, > I understand that the configuration property:=20 > wrapper.ntservice.starttype can take either AUTO_START or DEMAND_START = > values. > > I set it to AUTO_START, but, when installed, my application does not=20 > start automatically. > Does the machine need to be restarted for the application to be=20 > started automatically? > > Thanks, > Aparna > > ---------------------------------------------------------------------- > -- > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by DB2 Express Download DB2 Express = > C - the FREE version of DB2 express and take control of your XML. No=20 > limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ---------------------------------------------------------------------- > -- > > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > =20 -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - = the FREE version of DB2 express and take control of your XML. No limits. = Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: <a.s...@aa...> - 2007-04-20 17:04:33
|
Hello, AUTO_START means that the service is automatically started when the machine boots. André Aparna Khade schrieb: > > Could anyone please help me with this. > > Thanks, > Aparna > > _____________________________________________ > *From: * Aparna Khade > *Sent: * Friday, April 06, 2007 3:57 PM > *To: * 'wra...@li...' > *Subject: * Need information regarding > "wrapper.ntservice.starttype" > > Hi, > I understand that the configuration property: > wrapper.ntservice.starttype can take either AUTO_START or DEMAND_START > values. > > I set it to AUTO_START, but, when installed, my application does not > start automatically. > Does the machine need to be restarted for the application to be > started automatically? > > Thanks, > Aparna > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Aparna K. <ap...@da...> - 2007-04-20 17:00:35
|
Could anyone please help me with this. Thanks, Aparna > _____________________________________________=20 > From: Aparna Khade =20 > Sent: Friday, April 06, 2007 3:57 PM > To: 'wra...@li...' > Subject: Need information regarding "wrapper.ntservice.starttype" >=20 > Hi, > I understand that the configuration property: > wrapper.ntservice.starttype can take either AUTO_START or DEMAND_START > values. > I set it to AUTO_START, but, when installed, my application does not > start automatically.=20 > Does the machine need to be restarted for the application to be > started automatically? >=20 > Thanks, > Aparna |
|
From: Markus S. <sc...@gm...> - 2007-04-20 14:46:05
|
Any input on this? Thanks 2007/4/18, Markus Schlegel <sc...@gm...>: > > Is there any progress in supporting Windows 64-bit ? > What exactly does not work, when the wrapper.dll can not be loaded? As far > as I can see, I can start the service, but there is a message on the command > line.... > > Thanks > Markus > > |
|
From: Markus S. <sc...@gm...> - 2007-04-18 12:18:52
|
Is there any progress in supporting Windows 64-bit ? What exactly does not work, when the wrapper.dll can not be loaded? As far as I can see, I can start the service, but there is a message on the command line.... Thanks Markus |
|
From: Jim R. <jr...@er...> - 2007-04-17 17:50:03
|
Some time ago I made a change to the .exe to use WinMain so that console applications start without a Command Shell on Windows. I need to make this change again, and wonder if anyone else has any thoughts insights, etc. on this topic. I've also just come across the JDIC "TrayIcon" application, which I feel should have some relevance to this discussion, although I'm not sure what. Jim -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com |
|
From: <SA...@sy...> - 2007-04-17 15:11:40
|
Hi guys,
Thank you for your help.
Since the Java code, that I used in my example, is written by another
project, I'm not allowed to change it
so I had to come up with something else.
If I remember correctly win32 services are console applications
so in my configuration file I set the following properties:
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=true
wrapper.ntservice.console=TRUE
wrapper.ntservice.hide-console=FALSE
and it works!!
Regards,
Sabina Albu
Developer, Financial Capture Solutions, Technology Services
Symcor Inc.
wrapper-user-requ
es...@li...
orge.net To
Sent by: wra...@li...
wrapper-user-boun cc
ce...@li...
orge.net Subject
Wrapper-user Digest, Vol 11, Issue
5
11/04/2007 06:17
PM
Please respond to
wrapper-user@list
s.sourceforge.net
Send Wrapper-user mailing list submissions to
wra...@li...
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/wrapper-user
or, via email, send a message with subject or body 'help' to
wra...@li...
You can reach the person managing the list at
wra...@li...
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wrapper-user digest..."
Today's Topics:
1. Re: Executing code upon termination of NT service (Leif Mortenson)
2. Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid" (SA...@sy...)
3. Re: Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid" (David Hayes)
4. Re: Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid" (Andreas Wendt)
5. Re: Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid" (Leif Mortenson)
----------------------------------------------------------------------
Message: 1
Date: Tue, 10 Apr 2007 07:58:00 +0900
From: Leif Mortenson <le...@ta...>
Subject: Re: [Wrapper-user] Executing code upon termination of NT
service
To: wra...@li...
Message-ID: <461...@ta...>
Content-Type: text/plain; charset=windows-1252; format=flowed
Raymond,
WrapperListener.stop() is called by the WrapperManager class when it is
attempting to
shut down your java application cleanly. In the case of the
WrapperSimpleApp
implementation, the stop() method does not do anything. Applications
using the
WrapperSimpleStop helper class are expected to clean themselves up via a
shutdown
hook. As a general rule though, startup methods should call the super
class's method
at the beginning of the method and shutdown methods should do so at the
end. So
follow that pattern and call super.stop() after your code has executed.
That said however, the stop() method is called when the Wrapper wants to
stop the
JVM. This can happen in response to an external event like CTRL-C being
pressed,
or the service manager attempting to stop the service. It can also
happen if the
Wrapper's internal shutdown hook is started in response to the JVM
shutdown starting
on its own via a call to System.exit or something.
Important note is that the stop() method will ONLY be called for clean
shutdowns
of the JVM. If the JVM crashes or is killed because it has hung, the
stop() method
will never be called.
I have been working on a feature to allow the execution of external
applications
in response to things like the JVM being restarted or stopped. This
needs to happen
from the wrapper process, implemented in C, to make sure that those
applications
are always launched.
Cheers,
Leif
Raymond Bleach wrote:
>
> We have set up the wrapper as an NT service using the WrapperSimpleApp
> class. This is used to start a vendor supplied process that handles
> RPC requests.
>
> Now I have a need to execute some custom code whenever the NT service
> is stopped so that I can perform some cleanup and rolling of logs
> after the vendors? process terminates.
>
> I am looking at extending the WrapperSimpleApp and adding my custom
> code into the stop() method. I need to execute my code after the
> vendor?s code has stopped.
>
> Q: Is the stop() method called after the wrapper.app.parameter.1 has
> completed ?
>
> Q: Should I call the super.stop() method before or after execution of
> my custom code?
>
------------------------------
Message: 2
Date: Wed, 11 Apr 2007 10:51:54 -0400
From: SA...@sy...
Subject: [Wrapper-user] Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid"
To: wra...@li...
Message-ID:
<OF6...@sy...>
Content-Type: text/plain; charset=US-ASCII
Hi,
I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
Integration (Win32).
I used the templates provided in the /src/bin directory to create
MyService.bat
InstallMyService.bat
UninstallMyService.bat
However, when I run MyService from the Administrative tools>Services
an exception is thrown when I invoke Thread.currentThread().sleep(250);
with the message: The handle is invalid.
after which the service stops, following a normal shutdown routine.
I'm running on Win XP SP2
Java Service Wrapper 3.2.3
JDK 1.5.0_11
Bellow is a snippet from the log file:
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
method
INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
MyServiceApp:80 - Interrupted. The handle is invalid
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
completed
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
end. Main Completed=true, exitCode=null
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
thread stopped.
INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
WrapperListener.start()
INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
started.
INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
started
INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called by
thread: Wrapper-Shutdown-Hook
INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
and a snippet from my java class:
public class MyServiceApp{
public static void main(String[] args) {
MyServiceApp myService = new MyServiceApp();
myService .run();
}
public void run(){
//create new threads here
....
//sleep
try {
Thread.currentThread().sleep(250);
} catch (Exception e) {
log.error("Interrupted. " + e.getMessage());
}
}
}
Any ideas are welcomed.
Regards,
Sabina Albu
------------------------------
Message: 3
Date: Wed, 11 Apr 2007 16:18:30 +0100
From: David Hayes <da...@sm...>
Subject: Re: [Wrapper-user] Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid"
To: wra...@li...
Message-ID: <461...@sm...>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I just wanted to clarify something from you:
You have a run() method inside your service app, that you call directly
from the main() method. Are you intending this run() method to be
running in it's own thread, (whilst the starting thread, that executes
main() continues). If this is the case you should be calling
myService.start(); (and also be making the MyServiceApp extend Thread).
When the wrapper runs an application using method 1, it doesn't exactly
run the same way as it would without the wrapper. For a start, there are
other threads running by the time the code reaches your main() method
than there is without the wrapper. I suspect that you calling the
Thread.currentThread.sleep(250) is causing a wrapper thread to sleep,
and thus to lose a handle to some native resource.
David Hayes
SA...@sy... wrote:
> Hi,
>
> I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
> Integration (Win32).
> I used the templates provided in the /src/bin directory to create
> MyService.bat
> InstallMyService.bat
> UninstallMyService.bat
>
> However, when I run MyService from the Administrative tools>Services
> an exception is thrown when I invoke Thread.currentThread().sleep(250);
> with the message: The handle is invalid.
> after which the service stops, following a normal shutdown routine.
>
> I'm running on Win XP SP2
> Java Service Wrapper 3.2.3
> JDK 1.5.0_11
>
> Bellow is a snippet from the log file:
>
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
> method
> INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
> MyServiceApp:80 - Interrupted. The handle is invalid
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
> completed
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
> end. Main Completed=true, exitCode=null
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
> thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
> WrapperListener.start()
> INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
> DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
> DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
> started.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
> started
> INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called
by
> thread: Wrapper-Shutdown-Hook
> INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
> DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
> DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
>
>
> and a snippet from my java class:
>
>
> public class MyServiceApp{
> public static void main(String[] args) {
> MyServiceApp myService = new MyServiceApp();
> myService .run();
> }
>
> public void run(){
> //create new threads here
> ....
> //sleep
> try {
> Thread.currentThread().sleep(250);
> } catch (Exception e) {
> log.error("Interrupted. " + e.getMessage());
> }
> }
> }
>
>
> Any ideas are welcomed.
>
>
> Regards,
> Sabina Albu
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
------------------------------
Message: 4
Date: Wed, 11 Apr 2007 09:05:35 -0700
From: "Andreas Wendt" <And...@ag...>
Subject: Re: [Wrapper-user] Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid"
To: wra...@li...
Message-ID:
<7C7...@KH...>
Content-Type: text/plain; charset=us-ascii
Hi Sabina,
As I assume that the run() method is not intended to be run inside an own
thread, it runs inside the main thread.
Therefore, calling a Thread.sleep() in the main thread is not a good idea
as it may interfere with the JVM or the wrapper.
You should only call the sleep() method in the context of an own thread's
run() method to ensure that the proper thread is sleeping.
You should also not use Thread.currentThread().sleep(250) as sleep() is a
static method and prefixing it with currentThread() will have no effect
(see
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#sleep(long)).
If you would provide more info about what you are trying to achieve, I
could be more of a help.
--Andreas
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...] On Behalf Of David
Hayes
Sent: Wednesday, April 11, 2007 17:19
To: wra...@li...
Subject: Re: [Wrapper-user] Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is invalid"
I just wanted to clarify something from you:
You have a run() method inside your service app, that you call directly
from the main() method. Are you intending this run() method to be
running in it's own thread, (whilst the starting thread, that executes
main() continues). If this is the case you should be calling
myService.start(); (and also be making the MyServiceApp extend Thread).
When the wrapper runs an application using method 1, it doesn't exactly
run the same way as it would without the wrapper. For a start, there are
other threads running by the time the code reaches your main() method
than there is without the wrapper. I suspect that you calling the
Thread.currentThread.sleep(250) is causing a wrapper thread to sleep,
and thus to lose a handle to some native resource.
David Hayes
SA...@sy... wrote:
> Hi,
>
> I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
> Integration (Win32).
> I used the templates provided in the /src/bin directory to create
> MyService.bat
> InstallMyService.bat
> UninstallMyService.bat
>
> However, when I run MyService from the Administrative tools>Services
> an exception is thrown when I invoke Thread.currentThread().sleep(250);
> with the message: The handle is invalid.
> after which the service stops, following a normal shutdown routine.
>
> I'm running on Win XP SP2
> Java Service Wrapper 3.2.3
> JDK 1.5.0_11
>
> Bellow is a snippet from the log file:
>
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
> method
> INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
> MyServiceApp:80 - Interrupted. The handle is invalid
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
> completed
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
> end. Main Completed=true, exitCode=null
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
> thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
> WrapperListener.start()
> INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
> DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
> DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
> started.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
> started
> INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called
by
> thread: Wrapper-Shutdown-Hook
> INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
> DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
> DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
>
>
> and a snippet from my java class:
>
>
> public class MyServiceApp{
> public static void main(String[] args) {
> MyServiceApp myService = new MyServiceApp();
> myService .run();
> }
>
> public void run(){
> //create new threads here
> ....
> //sleep
> try {
> Thread.currentThread().sleep(250);
> } catch (Exception e) {
> log.error("Interrupted. " + e.getMessage());
> }
> }
> }
>
>
> Any ideas are welcomed.
>
>
> Regards,
> Sabina Albu
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
------------------------------
Message: 5
Date: Thu, 12 Apr 2007 07:14:08 +0900
From: Leif Mortenson <le...@ta...>
Subject: Re: [Wrapper-user] Exception thrown when invoking
Thread.currentThread().sleep(250) with message "The handle is
invalid"
To: wra...@li...
Message-ID: <461...@ta...>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Sabina,
Looking over your code, I do not see anything that you are doing
"wrong"
when using the WrapperSimpleApp (Method 1) integration method.
Calling sleep in the main method of your application is perfectly
valid.
Your use of the run() method name is a bit non-java standard in that it is
usually the method name called for the root of a new thread. But the way
you are calling it, it is just another method name, so no problem.
Nothing
you are doing in your code snippet should be affecting the Wrapper.
You did not send the beginning of your run method, most likely because
you feel it does not affect things. My guess is that something there may
be causing this, but I can't think off the top of my head what it would be.
I have seen cases in the past where an exception was being thrown from
a different location than I had thought due to ambiguous message text.
Could
you change your code as follows. The first is to make sure that sleep is
working before you do anything else, the second block is to see what the
exact exception is and what its full call stack is.
---
public class MyServiceApp{
public static void main(String[] args) {
System.out.println("MAIN1");
try {
Thread.sleep(250);
} catch (Exception e) {
log.error("Interrupted Main. " + e);
e.printStackTrace();
}
System.out.println("MAIN2");
MyServiceApp myService = new MyServiceApp();
myService .run();
}
public void run(){
System.out.println("HERE1");
try {
Thread.sleep(250);
} catch (Exception e) {
log.error("Interrupted1. " + e);
e.printStackTrace();
}
System.out.println("HERE2");
//create new threads here
....
//sleep
System.out.println("HERE3");
try {
Thread.sleep(250);
} catch (Exception e) {
log.error("Interrupted. " + e);
e.printStackTrace();
}
System.out.println("HERE4");
}
}
---
Does anything happen in your MyServiceApp constructor?
Cheers,
Leif
SA...@sy... wrote:
> Hi,
>
> I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
> Integration (Win32).
> I used the templates provided in the /src/bin directory to create
> MyService.bat
> InstallMyService.bat
> UninstallMyService.bat
>
> However, when I run MyService from the Administrative tools>Services
> an exception is thrown when I invoke Thread.currentThread().sleep(250);
> with the message: The handle is invalid.
> after which the service stops, following a normal shutdown routine.
>
> I'm running on Win XP SP2
> Java Service Wrapper 3.2.3
> JDK 1.5.0_11
>
> Bellow is a snippet from the log file:
>
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
> method
> INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
> MyServiceApp:80 - Interrupted. The handle is invalid
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
> completed
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
> end. Main Completed=true, exitCode=null
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
> thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
> WrapperListener.start()
> INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
> DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
> DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
> started.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
> started
> INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called
by
> thread: Wrapper-Shutdown-Hook
> INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
> DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
> DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
>
>
> and a snippet from my java class:
>
>
> public class MyServiceApp{
> public static void main(String[] args) {
> MyServiceApp myService = new MyServiceApp();
> myService .run();
> }
>
> public void run(){
> //create new threads here
> ....
> //sleep
> try {
> Thread.currentThread().sleep(250);
> } catch (Exception e) {
> log.error("Interrupted. " + e.getMessage());
> }
> }
> }
>
>
> Any ideas are welcomed.
>
>
> Regards,
> Sabina Albu
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
End of Wrapper-user Digest, Vol 11, Issue 5
*******************************************
|
|
From: Markus E. <mar...@tn...> - 2007-04-16 13:52:02
|
Oh, well that sounds easy :-)
I'll try this.
Thanks, as i am currently completly "in Java" i have lost the contact =20
to the C/C++ world completly.
Cheers,
Markus
Zitat von Hursev <hu...@si...>:
> Yes.
> For example with MS Visual Studio 2005 you choose 64bit target even if you
> are on 32bit windows.
>
> Hursev
>
> -----Original Message-----
> From: wra...@li...
> [mailto:wra...@li...] On Behalf Of Markus
> Eberle
> Sent: Monday, April 16, 2007 3:58 PM
> To: wra...@li...
> Subject: [Wrapper-user] Windows 64Bit
>
> Hi,
>
> we have to migrate our environment to a Windows 2003 64Bit Edition
> machine running on AMD-Opterons.
>
> As this is only our Production machine we are not allowed to install
> there a compiler to build the wrapper on it. The problem is that the
> testing machines are still 32bit machines.
> Is there a way to build the wrapper on a 32bit machine with target
> 64bit. (Or even better is there a 64Bit-build for download available?)
>
> Thanks in advance.
>
> Cheers,
> Markus
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
--=20
Markus Eberle
TNG Technology Consulting GmbH
mar...@tn...
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring
Geschaeftsfuehrer: Henrik Klagges, Gerhard Mueller, Eike Reinel
Amtsgericht Muenchen, HRB 135082
|
|
From: Hursev <hu...@si...> - 2007-04-16 13:43:46
|
Yes.
For example with MS Visual Studio 2005 you choose 64bit target even if you
are on 32bit windows.
Hursev
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Markus
Eberle
Sent: Monday, April 16, 2007 3:58 PM
To: wra...@li...
Subject: [Wrapper-user] Windows 64Bit
Hi,
we have to migrate our environment to a Windows 2003 64Bit Edition
machine running on AMD-Opterons.
As this is only our Production machine we are not allowed to install
there a compiler to build the wrapper on it. The problem is that the
testing machines are still 32bit machines.
Is there a way to build the wrapper on a 32bit machine with target
64bit. (Or even better is there a 64Bit-build for download available?)
Thanks in advance.
Cheers,
Markus
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|
|
From: Markus E. <mar...@tn...> - 2007-04-16 12:58:18
|
Hi,
we have to migrate our environment to a Windows 2003 64Bit Edition
machine running on AMD-Opterons.
As this is only our Production machine we are not allowed to install
there a compiler to build the wrapper on it. The problem is that the
testing machines are still 32bit machines.
Is there a way to build the wrapper on a 32bit machine with target
64bit. (Or even better is there a 64Bit-build for download available?)
Thanks in advance.
Cheers,
Markus
|
|
From: Leif M. <le...@ta...> - 2007-04-12 23:53:04
|
Khan,
This is most likely an integration problem. Could you add
wrapper.debug=true and then
send the output from a single invocation along with your wrapper.conf?
I will need that to be able to help.
Cheers,
Leif
Almond Khan wrote:
>
> This is happening only few times.
>
> This is snippet from log and I see 5 occurences of such thing. Why
> my JVM is exiting and who sent that request ?? Some times my
> application is running fine and I dont see any such thing in log.
> I have not set any time related properties in config file
>
> INFO | jvm 1 | 2007/04/12 15:35:18 | INFO: Initializing
> connection provider:
> ERROR | wrapper | 2007/04/12 15:35:18 | JVM did not exit on
> request, terminated
> INFO | wrapper | 2007/04/12 15:35:22 | Waiting to start...
> STATUS | wrapper | 2007/04/12 15:35:23 | Launching a JVM...
> INFO | jvm 2 | 2007/04/12 15:35:23 | $id$
> INFO | jvm 2 | 2007/04/12 15:35:23 | Wrapper (Version 3.2.3)
> http://wrapper.tanukisoftware.org
>
>
> Thanks,
>
> Khan
>
|
|
From: Almond K. <sha...@ho...> - 2007-04-12 18:29:57
|
This is happening only few times. This is snippet from log and I see 5 occurences of such thing. Why my JVM is exiting and who sent that request ?? Some times my application is running fine and I dont see any such thing in log. I have not set any time related properties in config file INFO | jvm 1 | 2007/04/12 15:35:18 | INFO: Initializing connection provider: ERROR | wrapper | 2007/04/12 15:35:18 | JVM did not exit on request, terminated INFO | wrapper | 2007/04/12 15:35:22 | Waiting to start... STATUS | wrapper | 2007/04/12 15:35:23 | Launching a JVM... INFO | jvm 2 | 2007/04/12 15:35:23 | $id$ INFO | jvm 2 | 2007/04/12 15:35:23 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org Thanks, Khan |
|
From: Leif M. <le...@ta...> - 2007-04-12 08:14:25
|
Almond,
I think you are pretty much correct. See the source example on the
following page:
http://wrapper.tanukisoftware.org/doc/english/integrate-listener.html
The only think I was unsure of from your mail is the contents of the
WrapperListener.start
method. See the javadocs for the WrapperListener interface. The start
method MUST
return null or an exit code within a timely matter. This means that if
your StartTomCat()
method does not return, it needs to be launched in a worker thread.
If you are interested in seeing the source, you can download one of
the source distributions
or view the source directly on line:
http://wrapper.svn.sourceforge.net/viewvc/wrapper/trunk/wrapper/src/java/org/tanukisoftware/wrapper/
http://wrapper.svn.sourceforge.net/viewvc/wrapper/trunk/wrapper/src/java/org/tanukisoftware/wrapper/WrapperSimpleApp.java?view=markup
Cheers,
Leif
Almond Khan wrote:
> Thanks Leif for such a detailed reply.
>
> The first step I did was to follow point 4 suggested by you. I started
> a non-daemon thread from my main method then my service was not
> stopped automatically until I stopped it.
>
> Most of the steps you told me were about clean up and I was able to do
> them simply.
>
> I have confusion about point 3. Please let me tell you about some
> context. I am going to use embedded Tom Cat in my application and I
> need it to install my program as Windows Service.
>
> So what I did initially was this.
> http://wrapper.tanukisoftware.org/doc/english/integrate-listener.html
>
> I created my application class "MyApp" with two methods StartTomCat()
> and StopTomCat() and I instantiated an object of my application in
> Main class (given by you as example).
>
> The log is as follows:
>
> STATUS | wrapper | 2007/03/19 12:06:56 | CP30 Service installed.
> STATUS | wrapper | 2007/03/19 12:06:59 | Starting the CP30 Service
> service...
> STATUS | wrapper | 2007/03/19 12:06:59 | --> Wrapper Started as Service
> STATUS | wrapper | 2007/03/19 12:06:59 | Launching a JVM...
> INFO | jvm 1 | 2007/03/19 12:06:59 | Wrapper (Version 3.2.3)
> http://wrapper.tanukisoftware.org
> INFO | jvm 1 | 2007/03/19 12:06:59 | Copyright 1999-2006 Tanuki
> Software, Inc. All Rights Reserved.
> INFO | jvm 1 | 2007/03/19 12:06:59 |
> INFO | wrapper | 2007/03/19 12:07:04 | Waiting to start...
> INFO | jvm 1 | 2007/03/19 12:07:00 |
> INFO | jvm 1 | 2007/03/19 12:07:00 | Constructor is called!
> INFO | jvm 1 | 2007/03/19 12:07:00 | Application is started!
> INFO | jvm 1 | 2007/03/19 12:07:06 | InThread !InThread !InThread
> !InThread
> INFO | jvm 1 | 2007/03/19 12:07:47 | Application is stopped!
> INFO | jvm 1 | 2007/03/19 12:07:47 | InThread !InThread !
> INFO | jvm 1 | 2007/03/19 12:07:48 | InThread !InThread
> STATUS | wrapper | 2007/03/19 12:07:48 | <-- Wrapper Stopped
>
> In conf file , I defined
>
> wrapper.java.mainclass=com.myappl.vcp.service.Main
>
> but I did not define any thing for wrapper.app.parameter.1
>
> I did not use WrapperSimpleApp instead I used class implementing
> WrapperListener and was able to achieve the expected results. Now
> source code for WrapperSimpleApp is not given so I do not know if I am
> missing some things in my WrapperListener class. I want Start() and
> Stop() methods of myself so I want to go with Integration method 3.
>
> So my understanding is that once I implement the interface
> WrapperListner then I have to make sure that I call startTomCat() from
> start() of it and StopTomCat() from stop() method of it and the
> interface will take care every thing itself. Basically my whole logic
> is floating around this code
> http://wrapper.tanukisoftware.org/doc/english/integrate-listener.html
> . Even my application class does not have main method because it has
> only two methods StartTomCat() and STopTomCat() .
>
> Please let me know if there is a flaw in my understanding.
>
> Thanks,
>
> Almond
>
>
> */Leif Mortenson <le...@ta...>/* wrote:
>
> Almond,
> You need to read the documentation again :-)
> http://wrapper.tanukisoftware.org/doc/english/integrate.html
>
> Most likely method #1 will work for you:
> http://wrapper.tanukisoftware.org/doc/english/integrate-simple-win.html
>
> There were a few problems with what you said below:
> 1) You should start with a clean directory and copy the required
> Wrapper
> files into your
> application rather than the other way around. There are some things
> that you will not
> need such as the wrappertest.jar file.
>
> 2) You should create your wrapper.conf file based on the template
> file:
> WRAPPER_HOME/src/conf/wrapper.conf.in rather than using
> WRAPPER_HOME/conf/wrapper.conf.
>
> 3) As specified in the documentation and in the wrapper.conf file,
> the wrapper.java.mainclass property is used to specify the main class
> passed to the JVM. In most cases however, this is not your
> application's
> main class. The Wrapper has some code which must be initialized in the
> JVM first. This is covered clearly in the above documentation. Try
> this:
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
>
> Your main method is then specified as the first parameter to the
> above main
> class.
> wrapper.app.parameter.1=
>
> 4) From the output that you sent however, it looks like your main
> class
> starts, prints a startup message, a shutdown message and then exits.
> Even if you do all of the above correctly, your application will
> still quit
> immediately because your main method does not appear to be designed
> to stay running. Running your class standalone in Java would have the
> same effect.
>
> The Wrapper works correctly in cases like this. But from your post, it
> sounds like you are expecting that the JVM stay running. Your
> application
> needs to start at least one non-daemon thread within the JVM that
> does not
> terminate. When all such threads have terminated, the JVM things the
> application has completed and the JVM will exit.
>
> 5) When you are still trying to get things working, I suggest
> running the
> application in a console window using TestWrapper.bat rather than
> running
> as a service. It is easier to see what is happening. Once that is all
> working,
> THEN, you should try it as a service.
>
> 6) Not required, but I suggest copying your bat files out of the
> WRAPPER_HOME/src/bin and then naming them after your application.
>
> Let me know if you have more questions...After checking out the
> docs of
> course.
>
> Cheers,
> Leif
>
>
> Almond Khan wrote:
> > All, I downloaded the source code and made my simple example
> with help
> > of code given on site(jar file is attached). That is very simple
> > example. My start method and stop method simply print message
> and then
> > exit.
> >
> > 1- I created jar file
> > 2- I put jar file in lib with wrapper.jar and wrappertest.jar
> > 3- I added classpath in conf file
> > wrapper.java.classpath.3=../lib/myexample.jar
> > 4- I modified Main class in conf file and pointed it to my example
> > wrapper.java.mainclass=org.tanukisoftware.wrapper.example.Main
> >
> > But when I am running , my service starts and stops(I assume).
> How did
> > I figure it out ??
> >
> >
> C:\wrapper-delta\wrapper-delta-pack-3.2.3\bin>InstallTestWrapper-NT.bat
> > wrapper | Test Wrapper Sample Application installed.
> >
> >
> C:\wrapper-delta\wrapper-delta-pack-3.2.3\bin>StartTestWrapper-NT.bat
> > wrapper | Starting the Test Wrapper Sample Application service...
> > wrapper | Test Wrapper Sample Application started.
> >
> > C:\wrapper-delta\wrapper-delta-pack-3.2.3\bin>StopTestWrapper-NT.bat
> > wrapper | The Test Wrapper Sample Application service was not
> running.
> >
> >
> C:\wrapper-delta\wrapper-delta-pack-3.2.3\bin>UninstallTestWrapper-NT.bat
> > wrapper | Test Wrapper Sample Application removed.
> >
> > So service was started but it stopped itself. I tried to start
> service
> > from windows service controller, it showed it was started but
> when I
> > refreshed service controller, it was not running.
> >
> > I looked at log and it also says the same thing.(Application is
> > started and Application is stopped are my custom messages)
> >
> > STATUS | wrapper | 2007/03/16 12:53:08 | Test Wrapper Sample
> > Application installed.
> > STATUS | wrapper | 2007/03/16 12:53:12 | Starting the Test Wrapper
> > Sample Application service...
> > STATUS | wrapper | 2007/03/16 12:53:12 | --> Wrapper Started as
> Service
> > STATUS | wrapper | 2007/03/16 12:53:12 | Launching a JVM...
> > INFO | jvm 1 | 2007/03/16 12:53:12 | Wrapper (Version 3.2.3)
> > http://wrapper.tanukisoftware.org
> > INFO | jvm 1 | 2007/03/16 12:53:12 | Copyright 1999-2006 Tanuki
> > Software, Inc. All Rights Reserved.
> > INFO | jvm 1 | 2007/03/16 12:53:12 |
> > INFO | jvm 1 | 2007/03/16 12:53:13 |
> > INFO | jvm 1 | 2007/03/16 12:53:13 | Application is started!
> > INFO | jvm 1 | 2007/03/16 12:53:14 |
> > INFO | jvm 1 | 2007/03/16 12:53:14 | Application is stopped!
> > STATUS | wrapper | 2007/03/16 12:53:14 | Test Wrapper Sample
> > Application started.
> > STATUS | wrapper | 2007/03/16 12:53:15 | <-- Wrapper Stopped
> >
> >
> >
> > I wonder why stop() method is getting called and why service is
> > stopping itself.
> >
> > Any help would be really appreciated. Please find an attached
> jar file
> > and conf for my code
> >
> > Thanks,
> >
> > Khan
> >
> > */Chuck Williams /* wrote:
> >
> > Wrapper is great to run your app as either a windows service or
> > linux daemon.� To try something quickly, read the Quick Start on
> > the project home page at
> > http://wrapper.tanukisoftware.org/doc/english/introduction.html
> >
> > Chuck
> >
> > Almond Khan wrote on 03/14/2007 01:47 PM:
> >> Hi,
> >>
> >> I googled for converting java application and ended with this
> >> project.
> >>
> >> We have embedded tomcat in our application and we use console to
> >> start/stop it.
> >>
> >> Now we are moving forward and we want to run applictaion as
> >> Windows service and I am wondering how can I convert my .class
> >> into Windows service.
> >>
> >> "So question is that how can I convert .class file into windows
> >> service"
> >>
> >> Any help is appreciated
> >>
> >> Thanks,
> >>
> >> Noman
> >
>
|
|
From: Leif M. <le...@ta...> - 2007-04-12 06:38:09
|
Hursev, Sorry for the delay getting back to you. I was able to get the 64-bit version working without this code. Looking up the APIs, it looks like they are required to be able to work the COM APIs. Could you give me some background on this patch? Users have complained in the past about having problems getting JNI code using COM to work from within the JVM. In all cass that I am aware of, this was being caused by path problems or the following: http://wrapper.tanukisoftware.org/doc/english/faq.html#4 Are there other reasons that I may need to add this patch? The Wrapper process itself does not need the COM access. Cheers, Leif Hursev wrote: > > Ok, > > The only real problem is that these is no API call that initialize > service’s security. > > This can be fixed with this code: > > (in src\c\wrapper_win.c) > > Add > > static BOOL bInitSecurity = FALSE; > > void InitSecurity() > > { > > HRESULT hr; > > if (!bInitSecurity) > > { > > hr = CoInitialize(NULL); > > hr = CoInitializeSecurity(NULL, -1, NULL, NULL, > > RPC_C_AUTHN_LEVEL_PKT, > > RPC_C_IMP_LEVEL_IMPERSONATE, > > NULL, > > EOAC_NONE, > > NULL); > > bInitSecurity = TRUE; > > } > > } > > And then add call to InitSecurity() in the begin of wrapperExecute(). > For example after “wrapperData->exitCode = 0;” > > Compile with ‘Struct member alignment’=’default’. In project that I > downloaded this option was /Zp1 (1 byte). > > This should fix problems. I tested (and I am it using on) Win2003 x64 > SP1/SP2. > > Note: > > 1. Parameters that I pass to CoInitializeSecurity are not best. If you > want you can choose better. > > 2. There should be better place for call to InitSecurity(). You need > it only once. > > *From:* wra...@li... > [mailto:wra...@li...] *On Behalf Of > *David Hayes > *Sent:* Monday, March 26, 2007 4:46 PM > *To:* wra...@li... > *Subject:* Re: [Wrapper-user] Win64 support > > The user list is the best place. Leif can build it in, but also other > Win64 users who may be desperate for a fix can get it too then. > > David > > ------------------------------------------------------------------------ > > *From:* wra...@li... > [mailto:wra...@li...] *On Behalf Of *Hursev > *Sent:* 26 March 2007 14:26 > *To:* wra...@li... > *Cc:* Hu...@si... > *Subject:* [Wrapper-user] Win64 support > > Hi, > > I think I found the 64bit windows support problem. Where should I send > the information? > > Hursev > |
|
From: Leif M. <le...@ta...> - 2007-04-12 06:26:12
|
Ben,
There were a bunch of posts around this. I wanted to make sure you
are not still waiting
for a reply. Were you able to reproduce this with wrapper.debug=true set?
Cheers,
Leif
Leif Mortenson wrote:
> Ben,
> Is this something that you are able to reproduce? If so, could you
> set the
> wrapper.debug=true property and then send me the resulting log? I am not
> able to tell the exact cause from what is in the current log.
>
> The JVM is being launched, the WrapperManager class is being initialized
> and a socket is being opened back to the Wrapper process. It appears to be
> failing when the Wrapper process sends a packet back to the JVM.
>
> Cheers,
> Leif
>
> Ben Cox wrote:
>
>> Hi all,
>>
>> I've been using Wrapper version 3.2.3 to manage my service on a Windows 2003
>> Server machine. Everything is working rather well, except occasionally when
>> requesting a restart from within the app (and sometimes just during a
>> "normal" restart after an error). What will happen is that the wrapper will
>> attempt to start my app and then give up and terminate the JVM within _one_
>> second!
>>
>> At least, that's how it looks from the timestamps on the log output
>> (below)... am I missing (or misinterpreting) a config file setting?
>>
>> Thanks,
>>
>> Ben
>>
>>
>> STATUS | wrapper | 2007/03/20 15:48:27 | JVM requested a restart.
>>
>> STATUS | wrapper | 2007/03/20 15:48:34 | Launching a JVM...
>>
>> INFO | jvm 17 | 2007/03/20 15:48:34 | Wrapper (Version 3.2.3)
>> http://wrapper.tanukisoftware.org
>>
>> INFO | jvm 17 | 2007/03/20 15:48:34 | Copyright 1999-2006 Tanuki
>> Software, Inc. All Rights Reserved.
>>
>> INFO | jvm 17 | 2007/03/20 15:48:34 |
>>
>> ERROR | wrapper | 2007/03/20 15:48:34 | Unable to send the start command
>> to the JVM.
>>
>> ERROR | wrapper | 2007/03/20 15:48:34 | JVM did not exit on request,
>> terminated
>>
>> STATUS | wrapper | 2007/03/20 15:48:39 | Launching a JVM...
>>
>> INFO | jvm 18 | 2007/03/20 15:48:40 | Wrapper (Version 3.2.3)
>> http://wrapper.tanukisoftware.org
>>
>> INFO | jvm 18 | 2007/03/20 15:48:40 | Copyright 1999-2006 Tanuki
>> Software, Inc. All Rights Reserved.
>>
>> INFO | jvm 18 | 2007/03/20 15:48:40 |
>>
>> ERROR | wrapper | 2007/03/20 15:48:40 | Unable to send the start command
>> to the JVM.
>>
>> ERROR | wrapper | 2007/03/20 15:48:40 | JVM did not exit on request,
>> terminated
>>
>> STATUS | wrapper | 2007/03/20 15:48:45 | Launching a JVM...
>>
>> INFO | jvm 19 | 2007/03/20 15:48:45 | Wrapper (Version 3.2.3)
>> http://wrapper.tanukisoftware.org
>>
>> INFO | jvm 19 | 2007/03/20 15:48:45 | Copyright 1999-2006 Tanuki
>> Software, Inc. All Rights Reserved.
>>
>> INFO | jvm 19 | 2007/03/20 15:48:45 |
>>
>> ERROR | wrapper | 2007/03/20 15:48:45 | Unable to send the start command
>> to the JVM.
>>
>> ERROR | wrapper | 2007/03/20 15:48:46 | JVM did not exit on request,
>> terminated
>>
>> STATUS | wrapper | 2007/03/20 15:48:51 | Launching a JVM...
>>
>> INFO | jvm 20 | 2007/03/20 15:48:51 | Wrapper (Version 3.2.3)
>> http://wrapper.tanukisoftware.org
>>
>> INFO | jvm 20 | 2007/03/20 15:48:51 | Copyright 1999-2006 Tanuki
>> Software, Inc. All Rights Reserved.
>>
>> INFO | jvm 20 | 2007/03/20 15:48:51 |
>>
>> ERROR | wrapper | 2007/03/20 15:48:51 | Unable to send the start command
>> to the JVM.
>>
>> ERROR | wrapper | 2007/03/20 15:48:51 | JVM did not exit on request,
>> terminated
>>
>> STATUS | wrapper | 2007/03/20 15:48:56 | Launching a JVM...
>>
>> INFO | jvm 21 | 2007/03/20 15:48:57 | Wrapper (Version 3.2.3)
>> http://wrapper.tanukisoftware.org
>>
>> INFO | jvm 21 | 2007/03/20 15:48:57 | Copyright 1999-2006 Tanuki
>> Software, Inc. All Rights Reserved.
>>
>> INFO | jvm 21 | 2007/03/20 15:48:57 |
>>
>> ERROR | wrapper | 2007/03/20 15:48:57 | Unable to send the start command
>> to the JVM.
>>
>> ERROR | wrapper | 2007/03/20 15:48:57 | JVM did not exit on request,
>> terminated
>>
>> FATAL | wrapper | 2007/03/20 15:48:57 | There were 5 failed launches in a
>> row, each lasting less than 300 seconds. Giving up.
>>
>> FATAL | wrapper | 2007/03/20 15:48:57 | There may be a configuration
>> problem: please check the logs.
>>
>> STATUS | wrapper | 2007/03/20 15:48:58 | <-- Wrapper Stopped
>>
|
|
From: Leif M. <le...@ta...> - 2007-04-12 06:22:36
|
Hans,
What do you mean by this? When you run the wrapper from a console,
it will send its
output to that console. Do you mean that you want to launch the
wrapper into a new
console window?
If so, the following should work for you:
start bin\wrapper.exe -c ..\conf\wrapper.conf
Cheers,
Leif
han...@do... wrote:
>
> Hi,
>
> I successfully registered my .jar app as a NT service. But now I want
> the console shown like when starting the app from console directly.
> Is this possible?
>
> I set these values in conf file, but they do not seem to have any effect:
>
> wrapper.ntservice.interactive=TRUE
> wrapper.ntservice.console=TRUE
> wrapper.ntservice.hide-console=FALSE
>
> I am using Java 1.4.2_14 and Wrapper_3.2.3. Thanks!
>
> Best regards
> Hans
>
|
|
From: Leif M. <le...@ta...> - 2007-04-12 06:18:53
|
Aparna,
The starttype is used to define how the service will be handled by
the Windows OS
when it boots up. If AUTO_START is used then service will be started
by the OS.
If it is DEMAND_START, it must be started manually.
When you install the wrapper with the batch file or the '-i'
command, the service
will be installed but not started. To start it, you need to execute
the start batch file
or run the wrapper with the -t' command.
I have added a new '-it' command for the 3.3.0 release which make it
possible to
install and start a service in a single command.
When you want to remove the service, the '-r' remove command is
smart and will
stop the service automatically before it attempts to remove it.
Cheers,
Leif
Aparna Khade wrote:
>
> Hi,
> I understand that the configuration property:
> wrapper.ntservice.starttype can take either AUTO_START or DEMAND_START
> values.
>
> I set it to AUTO_START, but, when installed, my application does not
> start automatically.
> Does the machine need to be restarted for the application to be
> started automatically?
>
> Thanks,
> Aparna
>
|
|
From: Leif M. <le...@ta...> - 2007-04-12 06:01:21
|
Andreas,
Thanks for the reply. There were not any other comments on this so
I went ahead
and removed native support for PPC and x86 for the next release. Both
platforms
will now be supported by the Universal X-Code distribution.
Cheers,
Leif
Andreas Wendt wrote:
> Hi Leif,
>
> I see no problem in just releasing a universal binary for Mac OS X.
> The only drawback is that it will not run on OS X 10.3 anymore.
> This Apple web site (http://www.apple.com/universal/) says that you need at least Mac OS X 10.4.4 for running universal binaries.
>
> Cheers,
> Andreas
>
> -----Original Message-----
> From: wra...@li... [mailto:wra...@li...] On Behalf Of Leif Mortenson
> Sent: Monday, April 02, 2007 10:16
> To: Wrapper User List
> Subject: [Wrapper-user] Question for OSX users
>
> Hi all,
> Currently, I am generating x86, PPC, AND a universal cross platform
> OSX distribution. This adds a lot of work and complexity. Looking at
> other applications, it looks like the norm to simply release a universal
> distribution.
>
> I am thinking about removing support for the x86 and PPC specific
> OSX distributions in the next release.
>
> Please let me know if you have any thoughts on this.
>
> Cheers,
> Leif
>
|
|
From: Leif M. <le...@ta...> - 2007-04-11 22:17:17
|
Sabina,
Looking over your code, I do not see anything that you are doing "wrong"
when using the WrapperSimpleApp (Method 1) integration method.
Calling sleep in the main method of your application is perfectly valid.
Your use of the run() method name is a bit non-java standard in that it is
usually the method name called for the root of a new thread. But the way
you are calling it, it is just another method name, so no problem. Nothing
you are doing in your code snippet should be affecting the Wrapper.
You did not send the beginning of your run method, most likely because
you feel it does not affect things. My guess is that something there may
be causing this, but I can't think off the top of my head what it would be.
I have seen cases in the past where an exception was being thrown from
a different location than I had thought due to ambiguous message text.
Could
you change your code as follows. The first is to make sure that sleep is
working before you do anything else, the second block is to see what the
exact exception is and what its full call stack is.
---
public class MyServiceApp{
public static void main(String[] args) {
System.out.println("MAIN1");
try {
Thread.sleep(250);
} catch (Exception e) {
log.error("Interrupted Main. " + e);
e.printStackTrace();
}
System.out.println("MAIN2");
MyServiceApp myService = new MyServiceApp();
myService .run();
}
public void run(){
System.out.println("HERE1");
try {
Thread.sleep(250);
} catch (Exception e) {
log.error("Interrupted1. " + e);
e.printStackTrace();
}
System.out.println("HERE2");
//create new threads here
....
//sleep
System.out.println("HERE3");
try {
Thread.sleep(250);
} catch (Exception e) {
log.error("Interrupted. " + e);
e.printStackTrace();
}
System.out.println("HERE4");
}
}
---
Does anything happen in your MyServiceApp constructor?
Cheers,
Leif
SA...@sy... wrote:
> Hi,
>
> I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
> Integration (Win32).
> I used the templates provided in the /src/bin directory to create
> MyService.bat
> InstallMyService.bat
> UninstallMyService.bat
>
> However, when I run MyService from the Administrative tools>Services
> an exception is thrown when I invoke Thread.currentThread().sleep(250);
> with the message: The handle is invalid.
> after which the service stops, following a normal shutdown routine.
>
> I'm running on Win XP SP2
> Java Service Wrapper 3.2.3
> JDK 1.5.0_11
>
> Bellow is a snippet from the log file:
>
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
> method
> INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
> MyServiceApp:80 - Interrupted. The handle is invalid
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
> completed
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
> end. Main Completed=true, exitCode=null
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
> thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
> WrapperListener.start()
> INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
> DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
> DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
> started.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
> started
> INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called by
> thread: Wrapper-Shutdown-Hook
> INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
> DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
> DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
>
>
> and a snippet from my java class:
>
>
> public class MyServiceApp{
> public static void main(String[] args) {
> MyServiceApp myService = new MyServiceApp();
> myService .run();
> }
>
> public void run(){
> //create new threads here
> ....
> //sleep
> try {
> Thread.currentThread().sleep(250);
> } catch (Exception e) {
> log.error("Interrupted. " + e.getMessage());
> }
> }
> }
>
>
> Any ideas are welcomed.
>
>
> Regards,
> Sabina Albu
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
|
|
From: Andreas W. <And...@ag...> - 2007-04-11 16:05:59
|
Hi Sabina, As I assume that the run() method is not intended to be run inside an = own thread, it runs inside the main thread. Therefore, calling a Thread.sleep() in the main thread is not a good = idea as it may interfere with the JVM or the wrapper. You should only call the sleep() method in the context of an own = thread's run() method to ensure that the proper thread is sleeping. You should also not use Thread.currentThread().sleep(250) as sleep() is = a static method and prefixing it with currentThread() will have no = effect (see http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#sleep(long)= ). If you would provide more info about what you are trying to achieve, I = could be more of a help. --Andreas -----Original Message----- From: wra...@li... = [mailto:wra...@li...] On Behalf Of David = Hayes Sent: Wednesday, April 11, 2007 17:19 To: wra...@li... Subject: Re: [Wrapper-user] Exception thrown when invoking = Thread.currentThread().sleep(250) with message "The handle is invalid" I just wanted to clarify something from you: You have a run() method inside your service app, that you call directly=20 from the main() method. Are you intending this run() method to be=20 running in it's own thread, (whilst the starting thread, that executes=20 main() continues). If this is the case you should be calling=20 myService.start(); (and also be making the MyServiceApp extend Thread). When the wrapper runs an application using method 1, it doesn't exactly=20 run the same way as it would without the wrapper. For a start, there are = other threads running by the time the code reaches your main() method=20 than there is without the wrapper. I suspect that you calling the=20 Thread.currentThread.sleep(250) is causing a wrapper thread to sleep,=20 and thus to lose a handle to some native resource. David Hayes SA...@sy... wrote: > Hi, > > I'm using the service wrapper as described in Method 1 - = WrapperSimpleApp > Integration (Win32). > I used the templates provided in the /src/bin directory to create > MyService.bat > InstallMyService.bat > UninstallMyService.bat > > However, when I run MyService from the Administrative tools>Services > an exception is thrown when I invoke = Thread.currentThread().sleep(250); > with the message: The handle is invalid. > after which the service stops, following a normal shutdown routine. > > I'm running on Win XP SP2 > Java Service Wrapper 3.2.3 > JDK 1.5.0_11 > > Bellow is a snippet from the log file: > > INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking = main > method > INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR > MyServiceApp:80 - Interrupted. The handle is invalid > INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main = method > completed > INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: = start(args) > end. Main Completed=3Dtrue, exitCode=3Dnull > INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner > thread stopped. > INFO | jvm 1 | 2007/04/11 09:39:12 | returned from > WrapperListener.start() > INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED : > DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED : > DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was > started. > INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread = stopped. > INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: = ShutdownHook > started > INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) = called by > thread: Wrapper-Shutdown-Hook > INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0 > DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0 > DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. = (0) > > > and a snippet from my java class: > > > public class MyServiceApp{ > public static void main(String[] args) { > MyServiceApp myService =3D new MyServiceApp(); > myService .run(); > } > > public void run(){ > //create new threads here > .... > //sleep > try { > Thread.currentThread().sleep(250); > } catch (Exception e) { > log.error("Interrupted. " + e.getMessage()); > } > } > } > > > Any ideas are welcomed. > > > Regards, > Sabina Albu > > = -------------------------------------------------------------------------= > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to = share your > opinions on IT & business topics through brief surveys-and earn cash > = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > =20 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: David H. <da...@sm...> - 2007-04-11 15:18:51
|
I just wanted to clarify something from you:
You have a run() method inside your service app, that you call directly
from the main() method. Are you intending this run() method to be
running in it's own thread, (whilst the starting thread, that executes
main() continues). If this is the case you should be calling
myService.start(); (and also be making the MyServiceApp extend Thread).
When the wrapper runs an application using method 1, it doesn't exactly
run the same way as it would without the wrapper. For a start, there are
other threads running by the time the code reaches your main() method
than there is without the wrapper. I suspect that you calling the
Thread.currentThread.sleep(250) is causing a wrapper thread to sleep,
and thus to lose a handle to some native resource.
David Hayes
SA...@sy... wrote:
> Hi,
>
> I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
> Integration (Win32).
> I used the templates provided in the /src/bin directory to create
> MyService.bat
> InstallMyService.bat
> UninstallMyService.bat
>
> However, when I run MyService from the Administrative tools>Services
> an exception is thrown when I invoke Thread.currentThread().sleep(250);
> with the message: The handle is invalid.
> after which the service stops, following a normal shutdown routine.
>
> I'm running on Win XP SP2
> Java Service Wrapper 3.2.3
> JDK 1.5.0_11
>
> Bellow is a snippet from the log file:
>
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
> method
> INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
> MyServiceApp:80 - Interrupted. The handle is invalid
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
> completed
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
> end. Main Completed=true, exitCode=null
> INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
> thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
> WrapperListener.start()
> INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
> DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
> DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
> started.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
> INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
> started
> INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called by
> thread: Wrapper-Shutdown-Hook
> INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
> DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
> DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
>
>
> and a snippet from my java class:
>
>
> public class MyServiceApp{
> public static void main(String[] args) {
> MyServiceApp myService = new MyServiceApp();
> myService .run();
> }
>
> public void run(){
> //create new threads here
> ....
> //sleep
> try {
> Thread.currentThread().sleep(250);
> } catch (Exception e) {
> log.error("Interrupted. " + e.getMessage());
> }
> }
> }
>
>
> Any ideas are welcomed.
>
>
> Regards,
> Sabina Albu
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
|
|
From: <SA...@sy...> - 2007-04-11 14:52:03
|
Hi,
I'm using the service wrapper as described in Method 1 - WrapperSimpleApp
Integration (Win32).
I used the templates provided in the /src/bin directory to create
MyService.bat
InstallMyService.bat
UninstallMyService.bat
However, when I run MyService from the Administrative tools>Services
an exception is thrown when I invoke Thread.currentThread().sleep(250);
with the message: The handle is invalid.
after which the service stops, following a normal shutdown routine.
I'm running on Win XP SP2
Java Service Wrapper 3.2.3
JDK 1.5.0_11
Bellow is a snippet from the log file:
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: invoking main
method
INFO | jvm 1 | 2007/04/11 09:39:12 | 09:39:12,960 ERROR
MyServiceApp:80 - Interrupted. The handle is invalid
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: main method
completed
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperSimpleApp: start(args)
end. Main Completed=true, exitCode=null
INFO | jvm 1 | 2007/04/11 09:39:12 | WrapperListener.start runner
thread stopped.
INFO | jvm 1 | 2007/04/11 09:39:12 | returned from
WrapperListener.start()
INFO | jvm 1 | 2007/04/11 09:39:12 | Send a packet STARTED :
DEBUG | wrapperp | 2007/04/11 09:39:12 | read a packet STARTED :
DEBUG | wrapper | 2007/04/11 09:39:12 | JVM signalled that it was
started.
INFO | jvm 1 | 2007/04/11 09:39:13 | Startup runner thread stopped.
INFO | jvm 1 | 2007/04/11 09:39:13 | Wrapper Manager: ShutdownHook
started
INFO | jvm 1 | 2007/04/11 09:39:13 | WrapperManager.stop(0) called by
thread: Wrapper-Shutdown-Hook
INFO | jvm 1 | 2007/04/11 09:39:13 | Send a packet STOP : 0
DEBUG | wrapperp | 2007/04/11 09:39:13 | read a packet STOP : 0
DEBUG | wrapper | 2007/04/11 09:39:13 | JVM requested a shutdown. (0)
and a snippet from my java class:
public class MyServiceApp{
public static void main(String[] args) {
MyServiceApp myService = new MyServiceApp();
myService .run();
}
public void run(){
//create new threads here
....
//sleep
try {
Thread.currentThread().sleep(250);
} catch (Exception e) {
log.error("Interrupted. " + e.getMessage());
}
}
}
Any ideas are welcomed.
Regards,
Sabina Albu
|