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: Sean S. <sea...@gm...> - 2004-07-22 13:37:28
|
Leif, Here is the attachment of the log file you requested with debugging turned on. Let me know if the exit was an expected result or not. BTW the java application being wrapper had done its job correctly. I just wanted to understand a little better how the wrapper determines whether it should terminate itself or not. On Thu, 22 Jul 2004 08:54:15 +0900, Leif Mortenson <le...@ta...> wrote: > Sean, > The Wrapper is designed to use basically the same logic as the JVM > to decide when > to exit. Once all non-daemon threads have terminated, the program is > determined to > have run to completion. > > There are other reasons why the application could be exiting. I > would need to see the > debug output of the Wrapper to determine exactly why your application is > exiting. > Set the wrapper.debug=true property in your wrapper.conf file and rerun > it. Then post > back by attaching the wrapper.log for a single run of the JVM. (Attach > the file rather than > including it in the body of the message to avoid any reformatting of the > file) > > Cheers, > Leif > > > > Sean Scott wrote: > > >Hi, > > > >Just wanted to know if it was common for the wrapper to stop abruply. > >I am currently using integration method 1. When i test my java applet > >using the command console, everything works fine, it goes through the > >apprpriate steps and outputs to the command. However after a second > >or two after the Java program is done doing its task the wrapper will > >stop itself. > > > >Right now my java program opens a connection to a DB, and retrieves some rows. > > > >Wanted to know if this was expected behavior. > > > >The goal is to have a webservice that will continously monitor a DB > >table every n seconds. > > > >Sean > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by BEA Weblogic Workshop > >FREE Java Enterprise J2EE developer tools! > >Get your free copy of BEA WebLogic Workshop 8.1 today. > >http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > >_______________________________________________ > >Wrapper-user mailing list > >Wra...@li... > >https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Leif M. <le...@ta...> - 2004-07-21 23:55:27
|
Sean,
The Wrapper is designed to use basically the same logic as the JVM
to decide when
to exit. Once all non-daemon threads have terminated, the program is
determined to
have run to completion.
There are other reasons why the application could be exiting. I
would need to see the
debug output of the Wrapper to determine exactly why your application is
exiting.
Set the wrapper.debug=true property in your wrapper.conf file and rerun
it. Then post
back by attaching the wrapper.log for a single run of the JVM. (Attach
the file rather than
including it in the body of the message to avoid any reformatting of the
file)
Cheers,
Leif
Sean Scott wrote:
>Hi,
>
>Just wanted to know if it was common for the wrapper to stop abruply.
>I am currently using integration method 1. When i test my java applet
>using the command console, everything works fine, it goes through the
>apprpriate steps and outputs to the command. However after a second
>or two after the Java program is done doing its task the wrapper will
>stop itself.
>
>Right now my java program opens a connection to a DB, and retrieves some rows.
>
>Wanted to know if this was expected behavior.
>
>The goal is to have a webservice that will continously monitor a DB
>table every n seconds.
>
>Sean
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by BEA Weblogic Workshop
>FREE Java Enterprise J2EE developer tools!
>Get your free copy of BEA WebLogic Workshop 8.1 today.
>http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|
|
From: Sean S. <sea...@gm...> - 2004-07-21 21:11:55
|
Hi, Just wanted to know if it was common for the wrapper to stop abruply. I am currently using integration method 1. When i test my java applet using the command console, everything works fine, it goes through the apprpriate steps and outputs to the command. However after a second or two after the Java program is done doing its task the wrapper will stop itself. Right now my java program opens a connection to a DB, and retrieves some rows. Wanted to know if this was expected behavior. The goal is to have a webservice that will continously monitor a DB table every n seconds. Sean |
|
From: Leif M. <lei...@ta...> - 2004-07-21 08:05:39
|
There was an anonymous bug posted a while back that aid that the Wrapper did not start up correctly if the Wrapper binary was located on a path which contained high ascii characters. Unfortunately the poster never replied to my queries. http://sourceforge.net/tracker/index.php?func=detail&aid=938251&group_id=39428&atid=425187 Living in Japan, I often run within paths containing double byte characters without any problem. That said, just because it works on Japanese does not mean that all is working correctly for other languages. So if any of you have access to non-english systems, I would be interested in hearing about any problems. Cheers, Leif |
|
From: Leif M. <le...@ta...> - 2004-07-21 07:27:11
|
Hello all, Tanuki Software is pound to announce the release of version 3.1.1 of the Java Service Wrapper. This version includes a number of important bug fixes. We recommend that all 3.1.0 users upgrade at their earliest convenience. 3.1.0 introduced a new tick based timer which was designed to be much more reliable under heavy loads and work correctly across system time changes. Several bugs have been fixed with the tick timer for the 3.1.1 release and it has undergone much more testing. While it has not yet been set to be active by default, we do feel that is stable enough to recommend its use by most users. It can be enabled by disabling the use of system time with the following property: wrapper.use_system_time=false We are interesting in getting feedback both positive and negative about the performance of this new timer. If feedback is in general positive and no problems are reported then the goal is to make it the default in the next release. Our internal tests show that the new tick timer meets its goals of being much more stable under heavy loads. It also handles time changes where the old system timer would cause JVM timeouts. Many other changes have also gone into this release, so be sure to review the release notes: http://wrapper.tanukisoftware.org/doc/english/release-notes.html Cheers, Leif Mortenson |
|
From: Thorsten K. <Th...@pl...> - 2004-07-19 12:03:24
|
Hello Leif, thanks for your quick answer. Leif Mortenson schrieb: > Thorsten, > I am afraid I have not seen this particular problem but I don't see > anything in the logs to > suggest that is a Wrapper problem. Turning on the wrapper.debug=true > property would > shed a little more light on whether or not the Wrapper is responsible > but I doubt it. Ok, then i know that I have the problem. > > If looks like your hsql code is starting a shutdown. This is > leading to a crash. Are > you using any native libraries besides the wrapper's? No I don't only using the wrapper's native libs. > > The most common way that I have seen to reliably reproduce crashes > is to copy new > versions of a jar over jars being used by a running JVM. The next > time the JVM tries > to load a new class from the jar, the JVM will crash. This happens > even without > using the Wrapper and is clearly a Java bug. Not sure if it is what > you are seeing though. Yes this is a very good tip. For testing purposes we have ant scripts that copies new generated Jars into the server. Then we call a restart function. We will check this. Many thanks. Thorsten -- Thorsten Kamann Email: tho...@pl... ICQ: 40746578 Yahoo: ThorQue |
|
From: Leif M. <le...@ta...> - 2004-07-19 11:05:15
|
Thorsten,
I am afraid I have not seen this particular problem but I don't see
anything in the logs to
suggest that is a Wrapper problem. Turning on the wrapper.debug=true
property would
shed a little more light on whether or not the Wrapper is responsible
but I doubt it.
If looks like your hsql code is starting a shutdown. This is
leading to a crash. Are
you using any native libraries besides the wrapper's?
The most common way that I have seen to reliably reproduce crashes
is to copy new
versions of a jar over jars being used by a running JVM. The next time
the JVM tries
to load a new class from the jar, the JVM will crash. This happens
even without
using the Wrapper and is clearly a Java bug. Not sure if it is what you
are seeing though.
Cheers,
Leif
Thorsten Kamann wrote:
> Hello Leif,
>
> I am using the Wrapper 3.1.0 for a project starting the tomcat with
> the wrapper.
> Now I get a stop exception very often:
>
> INFO | jvm 1 | 2004/07/17 18:20:21 | 17.07.2004 18:20:21
> org.apache.coyote.http11.Http11Protocol destroy
> INFO | jvm 1 | 2004/07/17 18:20:21 | INFO: Stopping Coyote
> HTTP/1.1 on http-8280
> INFO | jvm 1 | 2004/07/17 18:20:21 | 17.07.2004 18:20:21
> de.centaurus.platform.plugins.hsqldb.HsqlDBLifecycleListener stop
> INFO | jvm 1 | 2004/07/17 18:20:21 | INFO: Datenbank [ centaurus
> / localhost / 9.150 ] ist gestoppet
> INFO | jvm 1 | 2004/07/17 18:20:21 | [Server@11ca803]: Initiating
> shutdown sequence...
> INFO | jvm 1 | 2004/07/17 18:20:21 | [Server@11ca803]: Shutdown
> sequence completed in 21 ms.
> INFO | jvm 1 | 2004/07/17 18:20:21 | [Server@11ca803]: 2004-07-17
> 18:20:21.251 SHUTDOWN : System.exit() was not called
> INFO | jvm 1 | 2004/07/17 18:20:24 |
> INFO | jvm 1 | 2004/07/17 18:20:24 | An unexpected exception has
> been detected in native code outside the VM.
> INFO | jvm 1 | 2004/07/17 18:20:24 | Unexpected Signal :
> EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2C210D0
> INFO | jvm 1 | 2004/07/17 18:20:24 | Function=[Unknown.]
> INFO | jvm 1 | 2004/07/17 18:20:24 | Library=(N/A)
> INFO | jvm 1 | 2004/07/17 18:20:24 |
> INFO | jvm 1 | 2004/07/17 18:20:24 | NOTE: We are unable to
> locate the function name symbol for the error
> INFO | jvm 1 | 2004/07/17 18:20:24 | just occurred. Please
> refer to release documentation for possible
> INFO | jvm 1 | 2004/07/17 18:20:24 | reason and solutions.
> INFO | jvm 1 | 2004/07/17 18:20:24 |
> INFO | jvm 1 | 2004/07/17 18:20:24 |
> INFO | jvm 1 | 2004/07/17 18:20:24 | Current Java thread:
> INFO | jvm 1 | 2004/07/17 18:20:24 | at
> org.tanukisoftware.wrapper.WrapperManager.nativeGetControlEvent(Native
> Method)
> INFO | jvm 1 | 2004/07/17 18:20:24 | at
> org.tanukisoftware.wrapper.WrapperManager.access$1600(WrapperManager.java:232)
>
> INFO | jvm 1 | 2004/07/17 18:20:24 | at
> org.tanukisoftware.wrapper.WrapperManager$2.run(WrapperManager.java:652)
> INFO | jvm 1 | 2004/07/17 18:20:24 |
> INFO | jvm 1 | 2004/07/17 18:20:24 | Dynamic libraries:
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x00400000 - 0x00406000
> d:\java\j2sdk1.4.2_03\bin\java.exe
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77F40000 - 0x77FEE000
> C:\WINDOWS\System32\ntdll.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77E40000 - 0x77F38000
> C:\WINDOWS\system32\kernel32.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77DA0000 - 0x77E3C000
> C:\WINDOWS\system32\ADVAPI32.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x78000000 - 0x78087000
> C:\WINDOWS\system32\RPCRT4.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77BE0000 - 0x77C33000
> C:\WINDOWS\system32\MSVCRT.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x08000000 - 0x08138000
> d:\java\j2sdk1.4.2_03\jre\bin\client\jvm.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77D10000 - 0x77D9C000
> C:\WINDOWS\system32\USER32.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x7E180000 - 0x7E1C1000
> C:\WINDOWS\system32\GDI32.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x76AF0000 - 0x76B1D000
> C:\WINDOWS\System32\WINMM.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x10000000 - 0x10007000
> d:\java\j2sdk1.4.2_03\jre\bin\hpi.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x76F50000 - 0x76F60000
> C:\WINDOWS\System32\Secur32.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x00390000 - 0x0039E000
> d:\java\j2sdk1.4.2_03\jre\bin\verify.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x003A0000 - 0x003B9000
> d:\java\j2sdk1.4.2_03\jre\bin\java.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x003C0000 - 0x003CD000
> d:\java\j2sdk1.4.2_03\jre\bin\zip.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x02C10000 - 0x02C1F000
> D:\java\j2sdk1.4.2_03\jre\bin\net.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x71A10000 - 0x71A24000
> C:\WINDOWS\System32\WS2_32.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x71A00000 - 0x71A08000
> C:\WINDOWS\System32\WS2HELP.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x719B0000 - 0x719EC000
> C:\WINDOWS\system32\mswsock.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x719F0000 - 0x719F8000
> C:\WINDOWS\System32\wshtcpip.dll
> INFO | jvm 1 | 2004/07/17 18:20:24 | 0x76EE0000 - 0x76F05000
> C:\WINDOWS\System32\DNSAPI.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76F70000 - 0x76F77000
> C:\WINDOWS\System32\winrnr.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76F20000 - 0x76F4D000
> C:\WINDOWS\system32\WLDAP32.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76F80000 - 0x76F85000
> C:\WINDOWS\System32\rasadhlp.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x031C0000 - 0x031C8000
> D:\java\j2sdk1.4.2_03\jre\bin\nio.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76C50000 - 0x76C72000
> C:\WINDOWS\system32\imagehlp.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x6DA00000 - 0x6DA7D000
> C:\WINDOWS\system32\DBGHELP.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x77BD0000 - 0x77BD7000
> C:\WINDOWS\system32\VERSION.dll
> INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76BB0000 - 0x76BBB000
> C:\WINDOWS\System32\PSAPI.DLL
> INFO | jvm 1 | 2004/07/17 18:20:25 |
> INFO | jvm 1 | 2004/07/17 18:20:25 | Heap at VM Abort:
> INFO | jvm 1 | 2004/07/17 18:20:25 | Heap
> INFO | jvm 1 | 2004/07/17 18:20:25 | def new generation total
> 2304K, used 1034K [0x10010000, 0x10290000, 0x109e0000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | eden space 2048K, 41%
> used [0x10010000, 0x100e66b0, 0x10210000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | from space 256K, 69% used
> [0x10210000, 0x1023c298, 0x10250000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | to space 256K, 0% used
> [0x10250000, 0x10250000, 0x10290000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | tenured generation total
> 30272K, used 12679K [0x109e0000, 0x12770000, 0x18010000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | the space 30272K, 41%
> used [0x109e0000, 0x11641d68, 0x11641e00, 0x12770000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | compacting perm gen total
> 12544K, used 12356K [0x18010000, 0x18c50000, 0x1c010000)
> INFO | jvm 1 | 2004/07/17 18:20:25 | the space 12544K, 98%
> used [0x18010000, 0x18c210f0, 0x18c21200, 0x18c50000)
> INFO | jvm 1 | 2004/07/17 18:20:25 |
> INFO | jvm 1 | 2004/07/17 18:20:25 | Local Time = Sat Jul 17
> 18:20:24 2004
> INFO | jvm 1 | 2004/07/17 18:20:25 | Elapsed Time = 42
> INFO | jvm 1 | 2004/07/17 18:20:25 | #
> INFO | jvm 1 | 2004/07/17 18:20:25 | # The exception above was
> detected in native code outside the VM
> INFO | jvm 1 | 2004/07/17 18:20:25 | #
> INFO | jvm 1 | 2004/07/17 18:20:25 | # Java VM: Java HotSpot(TM)
> Client VM (1.4.2_03-b02 mixed mode)
> INFO | jvm 1 | 2004/07/17 18:20:25 | #
> INFO | jvm 1 | 2004/07/17 18:20:25 | # An error report file has
> been saved as hs_err_pid4924.log.
> INFO | jvm 1 | 2004/07/17 18:20:25 | # Please refer to the file
> for further information.
> INFO | jvm 1 | 2004/07/17 18:20:25 | #
> STATUS | wrapper | 2004/07/17 18:20:25 | <-- Wrapper Stopped
>
> Do you know this error ? Or is this my problem (wrong configuration or
> so)?
>
> Best regards
> Thorsten
>
|
|
From: Leif M. <le...@ta...> - 2004-07-19 10:58:22
|
Ted, Ted Hudacko wrote: >That is an excellent hypothesis. I experimented with an even simpler >version of the VB script that, rather than opening Excel, simply created a >new text file in the root directory. E.g.: > > Set objFS = CreateObject( "Scripting.FileSystem" ) > objFS.CreateTextFile "C:\foobar.txt" > >This works fine in both console and service modes, and with the service >running either as LocalSystem or Administrator (the account I normally log >in as). > >Unfortunately, when I substitute the commands to open Excel back into the VB >script, Excel does not open. Same result happens if the script is changed >to simply display a message box: > > MsgBox foo > >So it does indeed appear that the issue is interactivity with the desktop by >the service wrapper under certain user identities. > > Ok, so is sounding more like that might what your problem is. When you run as the default SYSTEM user, with wrapper.ntservice.interactive set, you are not seeing anything come up? I would have thought that would have made any dialogs visible. I have noticed that when using remote terminal to connect to a system, it does not seem possible to use interactive services. ie, they never show up on these remote connections. Not sure the details behind this, but I have noticed at a customer site. Also note the issue with pre 1.4.0 JVMs described here: http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-interactive.html I am not sure if this also pertains to their child processes. >>What happens if you run the Wrapper as the user you are normally logged >>in as? You can >>do this using the wrapper.ntservice.account / wrapper.ntservice.password >>properties. Let >>me know whether or not it works when running as you. If so then we can >>proceed with >>trying to figure out how to get it running as the SYSTEM user. >> >> > >I uninstalled, then reinstalled the JBoss service, making sure that I had >the following properties set in the wrapper.conf: > wrapper.ntservice.adviser=true > wrapper.ntservice.account=.\Administrator > wrapper.ntservice.password=mypassword > wrapper.ntservice.interactive=true > >However, the following warning appears: > wrapper | Ignoring the wrapper.ntservice.interactive property because it >can not be set when wrapper.ntservice.account is also set. > >Checking your source code, this string appears in >wrapperBuildNTServiceInfo() > Wrapper_3.1.0_src\src\c\wrapper.c > >Here, you force the interactive property to FALSE when both flags are set in >wrapper.conf. Not being familiar with your code, it's unclear in what >context this is called. Is this called every time the wrapper runs, or just >when you install the wrapper as a service? > > This is an issue with the underlying Windows API. The service manager only allows you to set a service as being interactive if and only if you are using the SYSTEM user. Other users are not allowed to interact with the desktop. I added code to the Wrapper to detect this case and display an error message rather than simply having it not work when the service was run. >The Windows Services GUI does not permit you to set "Allow service to >interact with desktop" for accounts other than Local System account. This >article suggests a hack to the Registry entry for that service: > http://www.dotnet247.com/247reference/msgs/33/166835.aspx > > Reading this, I am not sure that it would correct the problem and make non-system users able to interact with the desktop. Even for Windows, I would be surprised if it was that easy considering they have gone out of their way to disallow you the ability to set it in the service control panel. The only time the Wrapper makes use of the wrapper.ntservice.interactive property is when the service is being installed. Once a service has been installed, it does not have the ability to control this in its own process. >I tried setting this bit for the JBoss service after installing with >InstallJBoss-NT.bat But this still didn't work as desired. > > When using the Administrator account, do you still need to be able to interact with the desktop? If you can get the Wrapper and your application working in console mode when logged in as the Administrator, then I would expect it to work exactly the same when running as a service. Cheers, Leif |
|
From: Thorsten K. <Th...@pl...> - 2004-07-19 07:58:31
|
Hello Leif, I am using the Wrapper 3.1.0 for a project starting the tomcat with the wrapper. Now I get a stop exception very often: INFO | jvm 1 | 2004/07/17 18:20:21 | 17.07.2004 18:20:21 org.apache.coyote.http11.Http11Protocol destroy INFO | jvm 1 | 2004/07/17 18:20:21 | INFO: Stopping Coyote HTTP/1.1 on http-8280 INFO | jvm 1 | 2004/07/17 18:20:21 | 17.07.2004 18:20:21 de.centaurus.platform.plugins.hsqldb.HsqlDBLifecycleListener stop INFO | jvm 1 | 2004/07/17 18:20:21 | INFO: Datenbank [ centaurus / localhost / 9.150 ] ist gestoppet INFO | jvm 1 | 2004/07/17 18:20:21 | [Server@11ca803]: Initiating shutdown sequence... INFO | jvm 1 | 2004/07/17 18:20:21 | [Server@11ca803]: Shutdown sequence completed in 21 ms. INFO | jvm 1 | 2004/07/17 18:20:21 | [Server@11ca803]: 2004-07-17 18:20:21.251 SHUTDOWN : System.exit() was not called INFO | jvm 1 | 2004/07/17 18:20:24 | INFO | jvm 1 | 2004/07/17 18:20:24 | An unexpected exception has been detected in native code outside the VM. INFO | jvm 1 | 2004/07/17 18:20:24 | Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2C210D0 INFO | jvm 1 | 2004/07/17 18:20:24 | Function=[Unknown.] INFO | jvm 1 | 2004/07/17 18:20:24 | Library=(N/A) INFO | jvm 1 | 2004/07/17 18:20:24 | INFO | jvm 1 | 2004/07/17 18:20:24 | NOTE: We are unable to locate the function name symbol for the error INFO | jvm 1 | 2004/07/17 18:20:24 | just occurred. Please refer to release documentation for possible INFO | jvm 1 | 2004/07/17 18:20:24 | reason and solutions. INFO | jvm 1 | 2004/07/17 18:20:24 | INFO | jvm 1 | 2004/07/17 18:20:24 | INFO | jvm 1 | 2004/07/17 18:20:24 | Current Java thread: INFO | jvm 1 | 2004/07/17 18:20:24 | at org.tanukisoftware.wrapper.WrapperManager.nativeGetControlEvent(Native Method) INFO | jvm 1 | 2004/07/17 18:20:24 | at org.tanukisoftware.wrapper.WrapperManager.access$1600(WrapperManager.java:232) INFO | jvm 1 | 2004/07/17 18:20:24 | at org.tanukisoftware.wrapper.WrapperManager$2.run(WrapperManager.java:652) INFO | jvm 1 | 2004/07/17 18:20:24 | INFO | jvm 1 | 2004/07/17 18:20:24 | Dynamic libraries: INFO | jvm 1 | 2004/07/17 18:20:24 | 0x00400000 - 0x00406000 d:\java\j2sdk1.4.2_03\bin\java.exe INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77F40000 - 0x77FEE000 C:\WINDOWS\System32\ntdll.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77E40000 - 0x77F38000 C:\WINDOWS\system32\kernel32.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77DA0000 - 0x77E3C000 C:\WINDOWS\system32\ADVAPI32.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x08000000 - 0x08138000 d:\java\j2sdk1.4.2_03\jre\bin\client\jvm.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x77D10000 - 0x77D9C000 C:\WINDOWS\system32\USER32.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x7E180000 - 0x7E1C1000 C:\WINDOWS\system32\GDI32.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x76AF0000 - 0x76B1D000 C:\WINDOWS\System32\WINMM.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x10000000 - 0x10007000 d:\java\j2sdk1.4.2_03\jre\bin\hpi.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x76F50000 - 0x76F60000 C:\WINDOWS\System32\Secur32.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x00390000 - 0x0039E000 d:\java\j2sdk1.4.2_03\jre\bin\verify.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x003A0000 - 0x003B9000 d:\java\j2sdk1.4.2_03\jre\bin\java.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x003C0000 - 0x003CD000 d:\java\j2sdk1.4.2_03\jre\bin\zip.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x02C10000 - 0x02C1F000 D:\java\j2sdk1.4.2_03\jre\bin\net.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x71A10000 - 0x71A24000 C:\WINDOWS\System32\WS2_32.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x71A00000 - 0x71A08000 C:\WINDOWS\System32\WS2HELP.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x719B0000 - 0x719EC000 C:\WINDOWS\system32\mswsock.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x719F0000 - 0x719F8000 C:\WINDOWS\System32\wshtcpip.dll INFO | jvm 1 | 2004/07/17 18:20:24 | 0x76EE0000 - 0x76F05000 C:\WINDOWS\System32\DNSAPI.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76F70000 - 0x76F77000 C:\WINDOWS\System32\winrnr.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76F20000 - 0x76F4D000 C:\WINDOWS\system32\WLDAP32.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76F80000 - 0x76F85000 C:\WINDOWS\System32\rasadhlp.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x031C0000 - 0x031C8000 D:\java\j2sdk1.4.2_03\jre\bin\nio.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76C50000 - 0x76C72000 C:\WINDOWS\system32\imagehlp.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x6DA00000 - 0x6DA7D000 C:\WINDOWS\system32\DBGHELP.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll INFO | jvm 1 | 2004/07/17 18:20:25 | 0x76BB0000 - 0x76BBB000 C:\WINDOWS\System32\PSAPI.DLL INFO | jvm 1 | 2004/07/17 18:20:25 | INFO | jvm 1 | 2004/07/17 18:20:25 | Heap at VM Abort: INFO | jvm 1 | 2004/07/17 18:20:25 | Heap INFO | jvm 1 | 2004/07/17 18:20:25 | def new generation total 2304K, used 1034K [0x10010000, 0x10290000, 0x109e0000) INFO | jvm 1 | 2004/07/17 18:20:25 | eden space 2048K, 41% used [0x10010000, 0x100e66b0, 0x10210000) INFO | jvm 1 | 2004/07/17 18:20:25 | from space 256K, 69% used [0x10210000, 0x1023c298, 0x10250000) INFO | jvm 1 | 2004/07/17 18:20:25 | to space 256K, 0% used [0x10250000, 0x10250000, 0x10290000) INFO | jvm 1 | 2004/07/17 18:20:25 | tenured generation total 30272K, used 12679K [0x109e0000, 0x12770000, 0x18010000) INFO | jvm 1 | 2004/07/17 18:20:25 | the space 30272K, 41% used [0x109e0000, 0x11641d68, 0x11641e00, 0x12770000) INFO | jvm 1 | 2004/07/17 18:20:25 | compacting perm gen total 12544K, used 12356K [0x18010000, 0x18c50000, 0x1c010000) INFO | jvm 1 | 2004/07/17 18:20:25 | the space 12544K, 98% used [0x18010000, 0x18c210f0, 0x18c21200, 0x18c50000) INFO | jvm 1 | 2004/07/17 18:20:25 | INFO | jvm 1 | 2004/07/17 18:20:25 | Local Time = Sat Jul 17 18:20:24 2004 INFO | jvm 1 | 2004/07/17 18:20:25 | Elapsed Time = 42 INFO | jvm 1 | 2004/07/17 18:20:25 | # INFO | jvm 1 | 2004/07/17 18:20:25 | # The exception above was detected in native code outside the VM INFO | jvm 1 | 2004/07/17 18:20:25 | # INFO | jvm 1 | 2004/07/17 18:20:25 | # Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode) INFO | jvm 1 | 2004/07/17 18:20:25 | # INFO | jvm 1 | 2004/07/17 18:20:25 | # An error report file has been saved as hs_err_pid4924.log. INFO | jvm 1 | 2004/07/17 18:20:25 | # Please refer to the file for further information. INFO | jvm 1 | 2004/07/17 18:20:25 | # STATUS | wrapper | 2004/07/17 18:20:25 | <-- Wrapper Stopped Do you know this error ? Or is this my problem (wrong configuration or so)? Best regards Thorsten -- Thorsten Kamann Email: tho...@pl... ICQ: 40746578 Yahoo: ThorQue |
|
From: Ted H. <thu...@ro...> - 2004-07-19 05:29:05
|
>Ahhh, I think I might know what the problem is then. Some versions of >Office have a little auto registration wizard that pops up the very first time any specific >user runs office.. What >may be happening is that when the Wrapper is running as the SYSTEM user, >Excel is popping >up that wizard and waiting for the user to complete it?? That is an excellent hypothesis. I experimented with an even simpler version of the VB script that, rather than opening Excel, simply created a new text file in the root directory. E.g.: Set objFS = CreateObject( "Scripting.FileSystem" ) objFS.CreateTextFile "C:\foobar.txt" This works fine in both console and service modes, and with the service running either as LocalSystem or Administrator (the account I normally log in as). Unfortunately, when I substitute the commands to open Excel back into the VB script, Excel does not open. Same result happens if the script is changed to simply display a message box: MsgBox foo So it does indeed appear that the issue is interactivity with the desktop by the service wrapper under certain user identities. >What happens if you run the Wrapper as the user you are normally logged >in as? You can >do this using the wrapper.ntservice.account / wrapper.ntservice.password >properties. Let >me know whether or not it works when running as you. If so then we can >proceed with >trying to figure out how to get it running as the SYSTEM user. I uninstalled, then reinstalled the JBoss service, making sure that I had the following properties set in the wrapper.conf: wrapper.ntservice.adviser=true wrapper.ntservice.account=.\Administrator wrapper.ntservice.password=mypassword wrapper.ntservice.interactive=true However, the following warning appears: wrapper | Ignoring the wrapper.ntservice.interactive property because it can not be set when wrapper.ntservice.account is also set. Checking your source code, this string appears in wrapperBuildNTServiceInfo() Wrapper_3.1.0_src\src\c\wrapper.c Here, you force the interactive property to FALSE when both flags are set in wrapper.conf. Not being familiar with your code, it's unclear in what context this is called. Is this called every time the wrapper runs, or just when you install the wrapper as a service? The Windows Services GUI does not permit you to set "Allow service to interact with desktop" for accounts other than Local System account. This article suggests a hack to the Registry entry for that service: http://www.dotnet247.com/247reference/msgs/33/166835.aspx I tried setting this bit for the JBoss service after installing with InstallJBoss-NT.bat But this still didn't work as desired. Ted |
|
From: Leif M. <le...@ta...> - 2004-07-18 23:56:20
|
Ted Hudacko wrote: >Would you believe that it works in console mode, but not as a service? This >is getting more mysterious. > > Ahhh, I think I might know what the problem is then. Some versions of Office have a little auto registration wizard that pops up the very first time any specific user runs office.. What may be happening is that when the Wrapper is running as the SYSTEM user, Excel is popping up that wizard and waiting for the user to complete it?? What happens if you run the Wrapper as the user you are normally logged in as? You can do this using the wrapper.ntservice.account / wrapper.ntservice.password properties. Let me know whether or not it works when running as you. If so then we can proceed with trying to figure out how to get it running as the SYSTEM user. Cheers, Leif |
|
From: Ted H. <thu...@ro...> - 2004-07-18 18:57:03
|
I'm still trying to work through this problem. I >I was having the same problem when running as a service. The problem is >actually not >related to the Wrapper. If Excel runs into any problems while it is >running, it will pop up an >error dialog and not continue until a user has accepted it. The problem >of course is that >when running as a service, there is no way to see the dialog. The simple example in my previous post (exectest.vbs and exectest.jsp) simply opens Excel, sleeps then quits. There are no operations to cause error dialogs. >To figure out what the error is, I would try running in console mode >until you have gotten >things working. All paths etc should then be the same when running as a >service. My first >guess would be that you are having a path problem. The working directory >might not be getting set to what you are expecting. Would you believe that it works in console mode, but not as a service? This is getting more mysterious. Ted |
|
From: Ted H. <thu...@ro...> - 2004-07-17 19:14:31
|
Here is a self-contained and complete example of a JSP that execs a VB script. The VB script opens Excel, sleeps 4 seconds, quits Excel, then exits the script environment. On my Win2k server(s), this only works when JBoss is running standalone without the Java Service Wrapper. Could someone please try to reproduce my results? Thank you in advance. To install/run: 1) Copy VB script to C:\exectest.vbs 2) Install exectest.jsp to JBoss in your normal manner. --CUT HERE, FILE 1: exectest.vbs BEGIN--- Set objExcel = CreateObject( "Excel.Application" ) objExcel.DisplayAlerts = False objExcel.Visible = True WScript.Sleep 4000 objExcel.Quit WScript.Quit -- CUT HERE, FILE 2: exectest.jsp BEGIN-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ page import="java.io.*,java.net.*,java.util.* " %> <html> <head> <title>Runtime.getRuntime().exec() Test</title> <%! public class StreamGobbler extends Thread { InputStream is; String type; OutputStream os; public StreamGobbler( InputStream is, String type ) { this( is, type, null ); } public StreamGobbler( InputStream is, String type, OutputStream redirect ) { this.is = is; this.type = type; this.os = redirect; } public void run() { try { PrintWriter pw = null; if( os != null ) pw = new PrintWriter(os); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line = null; while( (line = br.readLine()) != null ) { if( pw != null ) pw.println( line ); System.out.println( type + ")" + line ); } if( pw != null ) pw.flush(); } catch( IOException ioe ) { ioe.printStackTrace(); } } } %> <% String[] cmdArray = new String[2]; cmdArray[0] = "cscript"; cmdArray[1] = "C:\\exectest.vbs"; try { Process proc = Runtime.getRuntime().exec( cmdArray ) ; StreamGobbler errorGobbler = new StreamGobbler( proc.getErrorStream(), "ERR" ); StreamGobbler outputGobbler = new StreamGobbler( proc.getErrorStream(), "OUT" ); errorGobbler.start(); outputGobbler.start(); int exitVal = proc.waitFor(); out.println("Exit Value =" + exitVal ); } catch( Exception e ) { e.printStackTrace(); } %> </html> |
|
From: Ted H. <thu...@ro...> - 2004-07-16 22:56:01
|
Eoin, The problem occurs with pretty much any script, not just a script using excel. I tried a simple example with Word, instead of Excel. Same result: works fine when JBoss is unwrapped, doesn't do anything if wrapped. There is only one VB script running at a time. As to your suggestion about Console.writeln's, I assume you mean I should insert print statements into the VB script, not in the Java application context? Yes, I have done this in the following form: WScript.echo "example" These are visible when running in wscript (not cscript) but again, only when JBoss is unwrapped. The only relevant factor appears to be using the Java Service Wrapper or not. Ted -----Original Message----- From: wra...@li... [mailto:wra...@li...] On Behalf Of Eoin Curran Sent: Friday, July 16, 2004 8:18 AM To: wra...@li... Subject: Re: [Wrapper-user] Wrapper causes zombie procecesses started from Runtime.getRuntime( exec ( cmd ) ); Ted, Some other things you could check to try and narrow it down: Does the problem occur with any script, or only if the script uses excel? Does it occur with any sheet or only this one? You say you call the script asynchronously - in your tests are there more than one vbsript process executing simultaneously? Now that you have StreamGobbler, you could stick in some Console.writeln's and see if the process get's stuck at a certain point in the script, or after the script exits? eoin. |
|
From: Eoin C. <eo...@pe...> - 2004-07-16 15:17:42
|
Ted, Some other things you could check to try and narrow it down: Does the problem occur with any script, or only if the script uses excel? Does it occur with any sheet or only this one? You say you call the script asynchronously - in your tests are there more than one vbsript process executing simultaneously? Now that you have StreamGobbler, you could stick in some Console.writeln's and see if the process get's stuck at a certain point in the script, or after the script exits? eoin. Ted Hudacko wrote: >Leif and Sal, >Leif, Sal, > >Thank you very much for detailed your responses. You have given me a >multiple areas to investigate, but I may have already been down some of >these paths. > >1) Possible unacknowledged error dialogs: >I was reasonably certain that the line in my VB script: > objExcel.DisplayAlerts = False > >would suppress error dialogs to the user. And I did thoroughly test the VB >script standalone (from the console) and from JBoss unwrapped. But I will >revisit this as a possibility. I see that your script has the following >line which I shall add: > xlObj.SetWarnings = false > >2) Path or working directory problems: >I didn't think this would be an issue, as I pass all arguments on the >command line, and refer to the template Excel spreadsheet with an absolute, >not relative, filesystem path. > >My additional investigation yesterday led me to believe that my problem >might be in how I construct the cmd string in this line: > Runtime.getRuntime( exec( cmd.toString() ) ); > >These two links indicated this might be the problem: > http://java.sun.com/j2se/1.4.2/docs/api/ (See Process and Runtime >classes) > http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html > > >The first article specifically warns of issues in the Windows environment. > >Per the second article's suggestion, I switched to a different version of >the overloaded exec() method. Now using String[] cmdArray as argument >instead of a long cmd String. Also, I added StreamGobbler class and the >constructs of the GoodWinExec.java example. > >After making these changes, I had the same result as before: It works in an >unwrapped JBoss, but not the wrapped JBoss. > >3) Making Excel visible. Yes, I do reset this flag during debugging. > objExcel.Visible = True >Very fun to watch! > >4) We tried changing the value of the wrapper.ntservice.interactive flag >but it did not have any apparent effect. > >5) VB On Error block. >I also am not a VB expert nor have I done any registry hacking but I will >definitely investigate this. > >Re: Sal's suggestions: >1) I was unaware of Poi http://jakarta.apache.org/poi/index.html >Reading & writing Excel format files is useful but to leverage the Excel >object model and to use Excel's computation engine, Excel has to be running. > >2) Java Mail API. I use this elsewhere in the application for some separate >functionality that generates PDF documents then emails them. Works great! >We considered reusing that functionality here but decided against PDF format >in favor of Excel because of certain computation and tabular formatting >where Excel is better suited. The PDF generation runs in process and >synchronously, blocking email until the PDF doc is written to the file >system. >We also wanted the Excel process to run asynchronously and not have to block >the email waiting on the file. Since the Excel object model allows emailing >natively, this seemed cleaner than writing a file and having another process >reopen it to send it. > >The Excel email capability works fine when exec()'ed from an unwrapped >JBoss. > > |
|
From: Ted H. <thu...@ro...> - 2004-07-16 14:48:42
|
Leif and Sal, Leif, Sal, Thank you very much for detailed your responses. You have given me a multiple areas to investigate, but I may have already been down some of these paths. 1) Possible unacknowledged error dialogs: I was reasonably certain that the line in my VB script: objExcel.DisplayAlerts = False would suppress error dialogs to the user. And I did thoroughly test the VB script standalone (from the console) and from JBoss unwrapped. But I will revisit this as a possibility. I see that your script has the following line which I shall add: xlObj.SetWarnings = false 2) Path or working directory problems: I didn't think this would be an issue, as I pass all arguments on the command line, and refer to the template Excel spreadsheet with an absolute, not relative, filesystem path. My additional investigation yesterday led me to believe that my problem might be in how I construct the cmd string in this line: Runtime.getRuntime( exec( cmd.toString() ) ); These two links indicated this might be the problem: http://java.sun.com/j2se/1.4.2/docs/api/ (See Process and Runtime classes) http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html The first article specifically warns of issues in the Windows environment. Per the second article's suggestion, I switched to a different version of the overloaded exec() method. Now using String[] cmdArray as argument instead of a long cmd String. Also, I added StreamGobbler class and the constructs of the GoodWinExec.java example. After making these changes, I had the same result as before: It works in an unwrapped JBoss, but not the wrapped JBoss. 3) Making Excel visible. Yes, I do reset this flag during debugging. objExcel.Visible = True Very fun to watch! 4) We tried changing the value of the wrapper.ntservice.interactive flag but it did not have any apparent effect. 5) VB On Error block. I also am not a VB expert nor have I done any registry hacking but I will definitely investigate this. Re: Sal's suggestions: 1) I was unaware of Poi http://jakarta.apache.org/poi/index.html Reading & writing Excel format files is useful but to leverage the Excel object model and to use Excel's computation engine, Excel has to be running. 2) Java Mail API. I use this elsewhere in the application for some separate functionality that generates PDF documents then emails them. Works great! We considered reusing that functionality here but decided against PDF format in favor of Excel because of certain computation and tabular formatting where Excel is better suited. The PDF generation runs in process and synchronously, blocking email until the PDF doc is written to the file system. We also wanted the Excel process to run asynchronously and not have to block the email waiting on the file. Since the Excel object model allows emailing natively, this seemed cleaner than writing a file and having another process reopen it to send it. The Excel email capability works fine when exec()'ed from an unwrapped JBoss. Regards, Ted -----Original Message----- From: wra...@li... [mailto:wra...@li...] On Behalf Of Leif Mortenson Sent: Friday, July 16, 2004 12:39 AM To: wra...@li... Subject: Re: [Wrapper-user] Wrapper causes zombie procecesses started from Runtime.getRuntime( exec ( cmd ) ); Ted, I wish you had posted this a couple weeks ago. I had to figure out how to do this for a client. Got it all figured out last week. I was having the same problem when running as a service. The problem is actually not related to the Wrapper. If Excel runs into any problems while it is running, it will pop up an error dialog and not continue until a user has accepted it. The problem of course is that when running as a service, there is no way to see the dialog. I solved this by including the root function in an On Error block which stores the error message into the registry and then returns. The cscript then waits for Excel to quit and checks for an error message in the registry. If there is an error then I can proceed to log it. Not sure if that is the best way to do it. In fact, I thought it was rather sloppy... But it gets the job done. My Java code also included some timeout code to kill the cscript process if it takes too long to complete. But the problem is that Excel is a child process of the cscript process, so killing the script process does not get rid of Excel. To figure out what the error is, I would try running in console mode until you have gotten things working. All paths etc should then be the same when running as a service. My first guess would be that you are having a path problem. The working directory might not be getting set to what you are expecting. You may be able to display Excel as it runs if you remove the flags that hide it from your cscript. Have not tested it, but you may be able to get it to be visible when running as a service by setting the wrapper.ntservice.interactive property. Here are some fragments from the code that I implemented. It has been many a year since I last touched VBA so you may have some suggestions on how I could do things better as well :-) First, my cscript, it takes the name of a csv formatted txt file and then uses Excel to generate a set of HTML reports which are then zipped up and placed into a directory. The only way I could figure out how to pass info back and forth between Excel was to use the registry. :-P --- On Error Resume Next if WScript.arguments.count = 3 then set shell = CreateObject ("WScript.Shell") ' Get the full base file. fullFile = WScript.arguments(0) WScript.echo "arg[0] Full File: " & fullFile excelFile = WScript.arguments(1) WScript.echo "arg[1] Excel File: " & excelFile report = WScript.arguments(2) WScript.echo "arg[1] Report: " & report ' Strip off the path and extension set fsObj = WScript.CreateObject ("Scripting.FileSystemObject") set fileObj = fsObj.GetFile (fullFile) fileBase = fileObj.Name If Right (fileBase, 4) = ".txt" then fileBase = Left(fileBase, Len(fileBase) - 4) End If WScript.echo "File Base: " & fileBase ' Store the location of the file into the Registry Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\" &report, fileBase & ".txt", "REG_SZ" ' Store the location of the application root into the Registry set fsObj = WScript.CreateObject ("Scripting.FileSystemObject") set fileObj = fsObj.GetFile (excelFile) set parentObj = fileObj.ParentFolder.ParentFolder Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\ROOT", parentObj.Path, "REG_SZ" Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\" &report& "_ERR", "", "REG_SZ" ' Load Excel to run its vba script. WScript.echo "Launching Excel..." set xlObj = CreateObject ("Excel.Application") 'xlObj.visible = false xlObj.SetWarnings = false xlObj.Workbooks.Open fileObj.Path xlObj.run "auto_open" xlObj.quit set xlObj=Nothing WScript.echo "Excel Completed." excelErr = Shell.RegRead("HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\" &report& "_ERR") If excelErr <> "" then WScript.echo "Excel had errors: " & excelErr WScript.quit 1 End If ' Store the generated HTML report along with its files into a ZIP via a temporary file. zipFile = "..\..\shinbun-data\import\" & fileBase & ".zip" tempFile = "..\..\shinbun-data\import\" & fileBase & ".tmp" WScript.echo "tempFile: " & tempFile WScript.echo "Generating Report Archive: " & zipFile 'WScript.echo "tempFile: " & tempFile shell.Run "jar cvf " & tempFile & " -C ..\work\generate " & fileBase & ".files", 0, true shell.Run "jar uvf " & tempFile & " -C ..\work\generate " & fileBase & ".htm", 0, true 'Rename the temp file to its final name 'set objFSO = CreateObject( "Scripting.FileSystemObject" ) 'objFSO.DeleteFile zipFile fsObj.MoveFile tempFile, zipFile 'Delete zip source files 'fsObj.DeleteFile "..\work\generate\" & fileBase & ".files\*.*" fsObj.DeleteFile "..\work\generate\" & fileBase & ".htm" 'WScript.echo "------" & "..\work\generate\" & fileBase & ".files" set folderObj = fsObj.GetFolder ("..\work\generate\" & fileBase & ".files") folderObj.Delete WScript.echo "Done." WScript.quit 0 else WScript.echo "Usage: cscript generate_report.vbs <data file> <excel file> <report>" WScript.quit 1 end if --- The Excel code was not all written by me. I just added the error trapping and registry code. The original script had been run manually to generate the HTML files. --- Sub Auto_Open() Dim Msg As String, Style As Integer, Response As Integer Dim File_CheckFLG As String, FileName As String, RootPath As String, workDir As String On Error GoTo DeathHandler RootPath = GetSetting("File Passing", "LINE NEWS", "ROOT", "NONE") workDir = "\work\" DIR_WK = RootPath & workDir & "generate\" DIR_DAT1 = RootPath & "\..\shinbun-data\import\" DIR_DAT2 = RootPath & "\shell\" DIR_DAT3 = RootPath & workDir & "generate\" Application.WindowState = xlMaximized ActiveWindow.Visible = False ChDrive Left(DIR_WK, 1) ChDir Left(DIR_WK, (Len(DIR_WK) - 1)) Msg = "Lead Time" Style = vbOKCancel Response = vbOK If Response = vbOK Then Dbpart_Flag = 0 DIR_WK2 = DIR_DAT1 FILE_TXT = GetSetting("File Passing", "LINE NEWS", "LT", "NONE") If Right(FILE_TXT, 3) = "txt" Then FileName = Left(FILE_TXT, Len(FILE_TXT) - 4) Else FileName = FILE_TXT End If If Len(DIR_WK2 & FILE_TXT) = 0 Then File_CheckFLG = "" Else On Error Resume Next File_CheckFLG = Dir(DIR_WK2 & FILE_TXT) On Error GoTo DeathHandler End If If Len(File_CheckFLG) <> 0 Then ' ' Snip guts that generate the data ' Windows(FILE_WK0).Activate ActiveWindow.Visible = True ActiveWindow.Close saveChanges:=False ' Save the HTML Application.ActiveWorkbook.Worksheets("LTGraph").SaveAs FileName:=DIR_DAT3 & FileName, FileFormat:=xlHtml Else Msg = "Bad input file." & Chr(13) & Chr(10) Style = vbOKOnly Response = MsgBox(Msg, Style) End If End If Msg = "Lead Time complete." & Chr(13) & Chr(10) Style = vbOKCancel ActiveWindow.Visible = True ActiveWindow.Close saveChanges:=False Exit Sub DeathHandler: Msg = "Error #" & Err.Number & " in " & Err.Source & " : " & Err.Description SaveSetting "File Passing", "LINE NEWS", "LT_ERR", Msg Err.Clear Exit Sub End Sub --- Hope that makes sense to you. Cheers, Leif Ted Hudacko wrote: > We have been using the Java Service Wrapper successfully for the past > year with JBoss 3.2.1. It has worked flawlessly. However we just added > a new application feature using the Java Runtime class to spawn a VB > script in the operating system environment (Windows Script Host > environment or 'cscript'). The VB script starts an instance of Excel, > inserts some values, does some processing, then emails the > spreadsheet. Excel is instructed to exit at the final line of the VB > script. The VB script works fine in standalone mode. It also works > correctly when JBoss is run without the Java Service Wrapper. > > However, when JBoss is wrapped, Excel never exits. Repeated executions > cause multiple, zombie versions of Excel to hang around, consuming > memory & resources. It is not always possible to kill these zombies > Excel's from the Windows Task Manager. A reboot is often required. > (This is Windows 2000 Server). > > It seems that the Java Service Wrapper interferes with one or more of > the following: > > 1) the java Runtime class > > 2) the Windows Script Host Environment (cscript) or > > 3) Excel > > Recommendations or suggested gladly welcome! Thank you. > > My JSP code looks like this: > > StringBuffer cmd; > > cmd.append( "cscript C:\\src\\excel.vbs fo...@ba... > <mailto:fo...@ba...>" ); > > Runtime.getRuntime( exec( cmd.toString() ) ); > > My VB script (excel.vbs) looks like this: > > Set objExcel = CreateObject( "Excel.Application" ) > > objExcel.DisplayAlerts = False > > objExcel.Visible = False > > Set wb = objExcel.Workbooks.Open( "C:\src\template.xls" ) > > . > > Set address = WScript.Arguments(0) > > wb.SendMail address, "title", False > > wb.Close False > > objExcel.Quit > > WScript.Quit > > I am using wrapper_win32_3.0.5 > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: Leif M. <le...@ta...> - 2004-07-16 08:55:10
|
Thanks. In this particular case, I got a rather complicated VBA app inside of an Excel file which reads in a csv text file. Does lots and lots of processing and then dumps out a set of HTML pages which contain a dozen or so graphs as images. No desire to rewrite all of that. They had a poor secretary who had to manually load and generate several of these a day. I just had to automate the process so she can do more interesting things. :-) They have asked about generating simple Excel files in the past. I have always "pushed" them on to using other technologies. This would make some of that possible. So thanks for pointing it out. Cheers, Leif Sal Ingrilli wrote: >i understand that you want to reuse your script, but you can avoid >the problem alltogether if you rewrite your script in java. > >you can use this library to read/write your excel doc: >http://jakarta.apache.org/poi/index.html > >and you can use java mail to send email or you can use the ant wrapper >for it which is very clean: >http://ant.apache.org/ > > |
|
From: Sal I. <sal...@vo...> - 2004-07-16 08:08:10
|
i understand that you want to reuse your script, but you can avoid the problem alltogether if you rewrite your script in java. you can use this library to read/write your excel doc: http://jakarta.apache.org/poi/index.html and you can use java mail to send email or you can use the ant wrapper for it which is very clean: http://ant.apache.org/ -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of Leif Mortenson Sent: Friday, July 16, 2004 12:39 AM To: wra...@li... Subject: Re: [Wrapper-user] Wrapper causes zombie procecesses started from Runtime.getRuntime( exec ( cmd ) ); Ted, I wish you had posted this a couple weeks ago. I had to figure out how to do this for a client. Got it all figured out last week. I was having the same problem when running as a service. The problem is actually not related to the Wrapper. If Excel runs into any problems while it is running, it will pop up an error dialog and not continue until a user has accepted it. The problem of course is that when running as a service, there is no way to see the dialog. I solved this by including the root function in an On Error block which stores the error message into the registry and then returns. The cscript then waits for Excel to quit and checks for an error message in the registry. If there is an error then I can proceed to log it. Not sure if that is the best way to do it. In fact, I thought it was rather sloppy... But it gets the job done. My Java code also included some timeout code to kill the cscript process if it takes too long to complete. But the problem is that Excel is a child process of the cscript process, so killing the script process does not get rid of Excel. To figure out what the error is, I would try running in console mode until you have gotten things working. All paths etc should then be the same when running as a service. My first guess would be that you are having a path problem. The working directory might not be getting set to what you are expecting. You may be able to display Excel as it runs if you remove the flags that hide it from your cscript. Have not tested it, but you may be able to get it to be visible when running as a service by setting the wrapper.ntservice.interactive property. Here are some fragments from the code that I implemented. It has been many a year since I last touched VBA so you may have some suggestions on how I could do things better as well :-) First, my cscript, it takes the name of a csv formatted txt file and then uses Excel to generate a set of HTML reports which are then zipped up and placed into a directory. The only way I could figure out how to pass info back and forth between Excel was to use the registry. :-P --- On Error Resume Next if WScript.arguments.count = 3 then set shell = CreateObject ("WScript.Shell") ' Get the full base file. fullFile = WScript.arguments(0) WScript.echo "arg[0] Full File: " & fullFile excelFile = WScript.arguments(1) WScript.echo "arg[1] Excel File: " & excelFile report = WScript.arguments(2) WScript.echo "arg[1] Report: " & report ' Strip off the path and extension set fsObj = WScript.CreateObject ("Scripting.FileSystemObject") set fileObj = fsObj.GetFile (fullFile) fileBase = fileObj.Name If Right (fileBase, 4) = ".txt" then fileBase = Left(fileBase, Len(fileBase) - 4) End If WScript.echo "File Base: " & fileBase ' Store the location of the file into the Registry Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\" &report, fileBase & ".txt", "REG_SZ" ' Store the location of the application root into the Registry set fsObj = WScript.CreateObject ("Scripting.FileSystemObject") set fileObj = fsObj.GetFile (excelFile) set parentObj = fileObj.ParentFolder.ParentFolder Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\ROOT", parentObj.Path, "REG_SZ" Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\" &report& "_ERR", "", "REG_SZ" ' Load Excel to run its vba script. WScript.echo "Launching Excel..." set xlObj = CreateObject ("Excel.Application") 'xlObj.visible = false xlObj.SetWarnings = false xlObj.Workbooks.Open fileObj.Path xlObj.run "auto_open" xlObj.quit set xlObj=Nothing WScript.echo "Excel Completed." excelErr = Shell.RegRead("HKCU\Software\VB and VBA Program Settings\File Passing\LINE NEWS\" &report& "_ERR") If excelErr <> "" then WScript.echo "Excel had errors: " & excelErr WScript.quit 1 End If ' Store the generated HTML report along with its files into a ZIP via a temporary file. zipFile = "..\..\shinbun-data\import\" & fileBase & ".zip" tempFile = "..\..\shinbun-data\import\" & fileBase & ".tmp" WScript.echo "tempFile: " & tempFile WScript.echo "Generating Report Archive: " & zipFile 'WScript.echo "tempFile: " & tempFile shell.Run "jar cvf " & tempFile & " -C ..\work\generate " & fileBase & ".files", 0, true shell.Run "jar uvf " & tempFile & " -C ..\work\generate " & fileBase & ".htm", 0, true 'Rename the temp file to its final name 'set objFSO = CreateObject( "Scripting.FileSystemObject" ) 'objFSO.DeleteFile zipFile fsObj.MoveFile tempFile, zipFile 'Delete zip source files 'fsObj.DeleteFile "..\work\generate\" & fileBase & ".files\*.*" fsObj.DeleteFile "..\work\generate\" & fileBase & ".htm" 'WScript.echo "------" & "..\work\generate\" & fileBase & ".files" set folderObj = fsObj.GetFolder ("..\work\generate\" & fileBase & ".files") folderObj.Delete WScript.echo "Done." WScript.quit 0 else WScript.echo "Usage: cscript generate_report.vbs <data file> <excel file> <report>" WScript.quit 1 end if --- The Excel code was not all written by me. I just added the error trapping and registry code. The original script had been run manually to generate the HTML files. --- Sub Auto_Open() Dim Msg As String, Style As Integer, Response As Integer Dim File_CheckFLG As String, FileName As String, RootPath As String, workDir As String On Error GoTo DeathHandler RootPath = GetSetting("File Passing", "LINE NEWS", "ROOT", "NONE") workDir = "\work\" DIR_WK = RootPath & workDir & "generate\" DIR_DAT1 = RootPath & "\..\shinbun-data\import\" DIR_DAT2 = RootPath & "\shell\" DIR_DAT3 = RootPath & workDir & "generate\" Application.WindowState = xlMaximized ActiveWindow.Visible = False ChDrive Left(DIR_WK, 1) ChDir Left(DIR_WK, (Len(DIR_WK) - 1)) Msg = "Lead Time" Style = vbOKCancel Response = vbOK If Response = vbOK Then Dbpart_Flag = 0 DIR_WK2 = DIR_DAT1 FILE_TXT = GetSetting("File Passing", "LINE NEWS", "LT", "NONE") If Right(FILE_TXT, 3) = "txt" Then FileName = Left(FILE_TXT, Len(FILE_TXT) - 4) Else FileName = FILE_TXT End If If Len(DIR_WK2 & FILE_TXT) = 0 Then File_CheckFLG = "" Else On Error Resume Next File_CheckFLG = Dir(DIR_WK2 & FILE_TXT) On Error GoTo DeathHandler End If If Len(File_CheckFLG) <> 0 Then ' ' Snip guts that generate the data ' Windows(FILE_WK0).Activate ActiveWindow.Visible = True ActiveWindow.Close saveChanges:=False ' Save the HTML Application.ActiveWorkbook.Worksheets("LTGraph").SaveAs FileName:=DIR_DAT3 & FileName, FileFormat:=xlHtml Else Msg = "Bad input file." & Chr(13) & Chr(10) Style = vbOKOnly Response = MsgBox(Msg, Style) End If End If Msg = "Lead Time complete." & Chr(13) & Chr(10) Style = vbOKCancel ActiveWindow.Visible = True ActiveWindow.Close saveChanges:=False Exit Sub DeathHandler: Msg = "Error #" & Err.Number & " in " & Err.Source & " : " & Err.Description SaveSetting "File Passing", "LINE NEWS", "LT_ERR", Msg Err.Clear Exit Sub End Sub --- Hope that makes sense to you. Cheers, Leif Ted Hudacko wrote: > We have been using the Java Service Wrapper successfully for the past > year with JBoss 3.2.1. It has worked flawlessly. However we just added > a new application feature using the Java Runtime class to spawn a VB > script in the operating system environment (Windows Script Host > environment or ‘cscript’). The VB script starts an instance of Excel, > inserts some values, does some processing, then emails the > spreadsheet. Excel is instructed to exit at the final line of the VB > script. The VB script works fine in standalone mode. It also works > correctly when JBoss is run without the Java Service Wrapper. > > However, when JBoss is wrapped, Excel never exits. Repeated executions > cause multiple, zombie versions of Excel to hang around, consuming > memory & resources. It is not always possible to kill these zombies > Excel’s from the Windows Task Manager. A reboot is often required. > (This is Windows 2000 Server). > > It seems that the Java Service Wrapper interferes with one or more of > the following: > > 1) the java Runtime class > > 2) the Windows Script Host Environment (cscript) or > > 3) Excel > > Recommendations or suggested gladly welcome! Thank you. > > My JSP code looks like this: > > StringBuffer cmd; > > cmd.append( “cscript C:\\src\\excel.vbs fo...@ba... > <mailto:fo...@ba...>” ); > > Runtime.getRuntime( exec( cmd.toString() ) ); > > My VB script (excel.vbs) looks like this: > > Set objExcel = CreateObject( “Excel.Application” ) > > objExcel.DisplayAlerts = False > > objExcel.Visible = False > > Set wb = objExcel.Workbooks.Open( “C:\src\template.xls” ) > > … > > Set address = WScript.Arguments(0) > > wb.SendMail address, “title”, False > > wb.Close False > > objExcel.Quit > > WScript.Quit > > I am using wrapper_win32_3.0.5 > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |
|
From: Leif M. <le...@ta...> - 2004-07-16 07:40:18
|
Ted,
I wish you had posted this a couple weeks ago. I had to figure out how
to do this for a
client. Got it all figured out last week.
I was having the same problem when running as a service. The problem is
actually not
related to the Wrapper. If Excel runs into any problems while it is
running, it will pop up an
error dialog and not continue until a user has accepted it. The problem
of course is that
when running as a service, there is no way to see the dialog.
I solved this by including the root function in an On Error block which
stores the error
message into the registry and then returns. The cscript then waits for
Excel to quit and
checks for an error message in the registry. If there is an error then I
can proceed to log
it. Not sure if that is the best way to do it. In fact, I thought it was
rather sloppy... But
it gets the job done.
My Java code also included some timeout code to kill the cscript process
if it takes too
long to complete. But the problem is that Excel is a child process of
the cscript process,
so killing the script process does not get rid of Excel.
To figure out what the error is, I would try running in console mode
until you have gotten
things working. All paths etc should then be the same when running as a
service. My first
guess would be that you are having a path problem. The working directory
might not be
getting set to what you are expecting.
You may be able to display Excel as it runs if you remove the flags that
hide it from your
cscript. Have not tested it, but you may be able to get it to be visible
when running as a
service by setting the wrapper.ntservice.interactive property.
Here are some fragments from the code that I implemented. It has been
many a year since
I last touched VBA so you may have some suggestions on how I could do
things better as
well :-)
First, my cscript, it takes the name of a csv formatted txt file and
then uses Excel to generate a
set of HTML reports which are then zipped up and placed into a
directory. The only way I
could figure out how to pass info back and forth between Excel was to
use the registry. :-P
---
On Error Resume Next
if WScript.arguments.count = 3 then
set shell = CreateObject ("WScript.Shell")
' Get the full base file.
fullFile = WScript.arguments(0)
WScript.echo "arg[0] Full File: " & fullFile
excelFile = WScript.arguments(1)
WScript.echo "arg[1] Excel File: " & excelFile
report = WScript.arguments(2)
WScript.echo "arg[1] Report: " & report
' Strip off the path and extension
set fsObj = WScript.CreateObject ("Scripting.FileSystemObject")
set fileObj = fsObj.GetFile (fullFile)
fileBase = fileObj.Name
If Right (fileBase, 4) = ".txt" then
fileBase = Left(fileBase, Len(fileBase) - 4)
End If
WScript.echo "File Base: " & fileBase
' Store the location of the file into the Registry
Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File
Passing\LINE NEWS\" &report, fileBase & ".txt", "REG_SZ"
' Store the location of the application root into the Registry
set fsObj = WScript.CreateObject ("Scripting.FileSystemObject")
set fileObj = fsObj.GetFile (excelFile)
set parentObj = fileObj.ParentFolder.ParentFolder
Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File
Passing\LINE NEWS\ROOT", parentObj.Path, "REG_SZ"
Shell.RegWrite "HKCU\Software\VB and VBA Program Settings\File
Passing\LINE NEWS\" &report& "_ERR", "", "REG_SZ"
' Load Excel to run its vba script.
WScript.echo "Launching Excel..."
set xlObj = CreateObject ("Excel.Application")
'xlObj.visible = false
xlObj.SetWarnings = false
xlObj.Workbooks.Open fileObj.Path
xlObj.run "auto_open"
xlObj.quit
set xlObj=Nothing
WScript.echo "Excel Completed."
excelErr = Shell.RegRead("HKCU\Software\VB and VBA Program Settings\File
Passing\LINE NEWS\" &report& "_ERR")
If excelErr <> "" then
WScript.echo "Excel had errors: " & excelErr
WScript.quit 1
End If
' Store the generated HTML report along with its files into a ZIP via a
temporary file.
zipFile = "..\..\shinbun-data\import\" & fileBase & ".zip"
tempFile = "..\..\shinbun-data\import\" & fileBase & ".tmp"
WScript.echo "tempFile: " & tempFile
WScript.echo "Generating Report Archive: " & zipFile
'WScript.echo "tempFile: " & tempFile
shell.Run "jar cvf " & tempFile & " -C ..\work\generate " & fileBase &
".files", 0, true
shell.Run "jar uvf " & tempFile & " -C ..\work\generate " & fileBase &
".htm", 0, true
'Rename the temp file to its final name
'set objFSO = CreateObject( "Scripting.FileSystemObject" )
'objFSO.DeleteFile zipFile
fsObj.MoveFile tempFile, zipFile
'Delete zip source files
'fsObj.DeleteFile "..\work\generate\" & fileBase & ".files\*.*"
fsObj.DeleteFile "..\work\generate\" & fileBase & ".htm"
'WScript.echo "------" & "..\work\generate\" & fileBase & ".files"
set folderObj = fsObj.GetFolder ("..\work\generate\" & fileBase & ".files")
folderObj.Delete
WScript.echo "Done."
WScript.quit 0
else
WScript.echo "Usage: cscript generate_report.vbs <data file> <excel
file> <report>"
WScript.quit 1
end if
---
The Excel code was not all written by me. I just added the error
trapping and registry
code. The original script had been run manually to generate the HTML files.
---
Sub Auto_Open()
Dim Msg As String, Style As Integer, Response As Integer
Dim File_CheckFLG As String, FileName As String, RootPath As String,
workDir As String
On Error GoTo DeathHandler
RootPath = GetSetting("File Passing", "LINE NEWS", "ROOT", "NONE")
workDir = "\work\"
DIR_WK = RootPath & workDir & "generate\"
DIR_DAT1 = RootPath & "\..\shinbun-data\import\"
DIR_DAT2 = RootPath & "\shell\"
DIR_DAT3 = RootPath & workDir & "generate\"
Application.WindowState = xlMaximized
ActiveWindow.Visible = False
ChDrive Left(DIR_WK, 1)
ChDir Left(DIR_WK, (Len(DIR_WK) - 1))
Msg = "Lead Time"
Style = vbOKCancel
Response = vbOK
If Response = vbOK Then
Dbpart_Flag = 0
DIR_WK2 = DIR_DAT1
FILE_TXT = GetSetting("File Passing", "LINE NEWS", "LT", "NONE")
If Right(FILE_TXT, 3) = "txt" Then
FileName = Left(FILE_TXT, Len(FILE_TXT) - 4)
Else
FileName = FILE_TXT
End If
If Len(DIR_WK2 & FILE_TXT) = 0 Then
File_CheckFLG = ""
Else
On Error Resume Next
File_CheckFLG = Dir(DIR_WK2 & FILE_TXT)
On Error GoTo DeathHandler
End If
If Len(File_CheckFLG) <> 0 Then
'
' Snip guts that generate the data
'
Windows(FILE_WK0).Activate
ActiveWindow.Visible = True
ActiveWindow.Close saveChanges:=False
' Save the HTML
Application.ActiveWorkbook.Worksheets("LTGraph").SaveAs
FileName:=DIR_DAT3 & FileName, FileFormat:=xlHtml
Else
Msg = "Bad input file." & Chr(13) & Chr(10)
Style = vbOKOnly
Response = MsgBox(Msg, Style)
End If
End If
Msg = "Lead Time complete." & Chr(13) & Chr(10)
Style = vbOKCancel
ActiveWindow.Visible = True
ActiveWindow.Close saveChanges:=False
Exit Sub
DeathHandler:
Msg = "Error #" & Err.Number & " in " & Err.Source & " : " & Err.Description
SaveSetting "File Passing", "LINE NEWS", "LT_ERR", Msg
Err.Clear
Exit Sub
End Sub
---
Hope that makes sense to you.
Cheers,
Leif
Ted Hudacko wrote:
> We have been using the Java Service Wrapper successfully for the past
> year with JBoss 3.2.1. It has worked flawlessly. However we just added
> a new application feature using the Java Runtime class to spawn a VB
> script in the operating system environment (Windows Script Host
> environment or ‘cscript’). The VB script starts an instance of Excel,
> inserts some values, does some processing, then emails the
> spreadsheet. Excel is instructed to exit at the final line of the VB
> script. The VB script works fine in standalone mode. It also works
> correctly when JBoss is run without the Java Service Wrapper.
>
> However, when JBoss is wrapped, Excel never exits. Repeated executions
> cause multiple, zombie versions of Excel to hang around, consuming
> memory & resources. It is not always possible to kill these zombies
> Excel’s from the Windows Task Manager. A reboot is often required.
> (This is Windows 2000 Server).
>
> It seems that the Java Service Wrapper interferes with one or more of
> the following:
>
> 1) the java Runtime class
>
> 2) the Windows Script Host Environment (cscript) or
>
> 3) Excel
>
> Recommendations or suggested gladly welcome! Thank you.
>
> My JSP code looks like this:
>
> StringBuffer cmd;
>
> cmd.append( “cscript C:\\src\\excel.vbs fo...@ba...
> <mailto:fo...@ba...>” );
>
> Runtime.getRuntime( exec( cmd.toString() ) );
>
> My VB script (excel.vbs) looks like this:
>
> Set objExcel = CreateObject( “Excel.Application” )
>
> objExcel.DisplayAlerts = False
>
> objExcel.Visible = False
>
> Set wb = objExcel.Workbooks.Open( “C:\src\template.xls” )
>
> …
>
> Set address = WScript.Arguments(0)
>
> wb.SendMail address, “title”, False
>
> wb.Close False
>
> objExcel.Quit
>
> WScript.Quit
>
> I am using wrapper_win32_3.0.5
>
|
|
From: Ted H. <thu...@ro...> - 2004-07-15 17:59:46
|
We have been using the Java Service Wrapper successfully for the past year with JBoss 3.2.1. It has worked flawlessly. However we just added a new application feature using the Java Runtime class to spawn a VB script in the operating system environment (Windows Script Host environment or 'cscript'). The VB script starts an instance of Excel, inserts some values, does some processing, then emails the spreadsheet. Excel is instructed to exit at the final line of the VB script. The VB script works fine in standalone mode. It also works correctly when JBoss is run without the Java Service Wrapper. However, when JBoss is wrapped, Excel never exits. Repeated executions cause multiple, zombie versions of Excel to hang around, consuming memory & resources. It is not always possible to kill these zombies Excel's from the Windows Task Manager. A reboot is often required. (This is Windows 2000 Server). It seems that the Java Service Wrapper interferes with one or more of the following: 1) the java Runtime class 2) the Windows Script Host Environment (cscript) or 3) Excel Recommendations or suggested gladly welcome! Thank you. My JSP code looks like this: StringBuffer cmd; cmd.append( "cscript C:\\src\\excel.vbs fo...@ba..." ); Runtime.getRuntime( exec( cmd.toString() ) ); My VB script (excel.vbs) looks like this: Set objExcel = CreateObject( "Excel.Application" ) objExcel.DisplayAlerts = False objExcel.Visible = False Set wb = objExcel.Workbooks.Open( "C:\src\template.xls" ) . Set address = WScript.Arguments(0) wb.SendMail address, "title", False wb.Close False objExcel.Quit WScript.Quit I am using wrapper_win32_3.0.5 -- Ted Hudacko thu...@ro... |
|
From: Daniel S. <jav...@da...> - 2004-07-14 14:27:15
|
Leif Mortenson wrote: > Daniel Schaedler wrote: > > What kind of notification are you interested in? There is an > outstanding feature request to > make it possible to execute arbitrary commands in response to various > Wrapper events. It > is on my active to do list, but will not make it into the next release. > https://sourceforge.net/tracker/index.php?func=detail&aid=837037&group_id=39428&atid=425190 Yes, that's exactly what I'm interested in. >> Another Idea was to use JMX; but how does this work if the service is >> already running? I can use JMX to start the wrapper, but the wrapper >> is alredy running (as Windows service) and I would like to connect >> afterwards. > > I am not sure what you are getting at here? JMX would be running > inside the JVM > wouldn't it. yes. I hoped there is a possibility to use JMX without changing any code of my application within the wrapper...I'l take the WrapperManager now to communicate with the wrapper (and have to change some code, of course) >> other question: >> I declared a dependent service. I would appreciate it now, that the >> dependent service restarts, if the JVM of the 'mother-service' crashes >> and restarts. any possibilities? > > Let me clarify what you are asking. ServiceB depends on ServiceA. > ServiceA is an instance > of the Wrapper and a JVM. If the JVM restarts, you would like ServiceB > to be restarted? exactly! I think this makes sense, because the wrapper itself does not have any functionality in general. If you have to restart your application you normaly also have to restart the dependent services. > The Wrapper does not currently do that for you. But it sounds like a > good feature to provide. > Verify that that is what you want and I'll log a feature request for > it. I'll need to look into > whether or not the Windows ServiceManager allows for that sort of thing.. I think it does. If you restart ServiceA (example above) Windows automaticaly stops ServiceB -> Stops ServiceA -> starts ServiceA -> Starts ServiceB. > If the Wrapper exits with an error exit code or crashes then the service > recovery features > can be used to restart the Wrapper just like any other service. I see. So if I kill the wrapper, there is obviously no exit code and Windows has no chance to know that the service has crashed.. thanks Daniel |
|
From: Leif M. <le...@ta...> - 2004-07-13 16:11:44
|
Daniel Schaedler wrote: > Is there a possibility to get a notification (besides the log) or to > start an other application if the Service-wrapper restarts the JVM > because of a crash? (my only idea was to scan the log for restarts) What kind of notification are you interested in? There is an outstanding feature request to make it possible to execute arbitrary commands in response to various Wrapper events. It is on my active to do list, but will not make it into the next release. https://sourceforge.net/tracker/index.php?func=detail&aid=837037&group_id=39428&atid=425190 You may want to add some comments to the Feature Request and monitor its status. > Another Idea was to use JMX; but how does this work if the service is > already running? I can use JMX to start the wrapper, but the wrapper > is alredy running (as Windows service) and I would like to connect > afterwards. I am not sure what you are getting at here? JMX would be running inside the JVM wouldn't it. > other question: > I declared a dependent service. I would appreciate it now, that the > dependent service restarts, if the JVM of the 'mother-service' crashes > and restarts. any possibilities? Let me clarify what you are asking. ServiceB depends on ServiceA. ServiceA is an instance of the Wrapper and a JVM. If the JVM restarts, you would like ServiceB to be restarted? The Wrapper does not currently do that for you. But it sounds like a good feature to provide. Verify that that is what you want and I'll log a feature request for it. I'll need to look into whether or not the Windows ServiceManager allows for that sort of thing.. > and why isn't it possible that windows restarts the wrapper-service if > it crashes (or execute one of the other windows-serivce options, when > the service fails) The service recovery features that Windows provides are designed to restart a service process if it fails. With the Wrapper, the Wrapper process is the service. The JVM is a child process of the Wrapper. If the JVM crashes or is restarted, the Wrapper is taking care of that. From the perspective of Windows, the Wrapper service has never failed. If the Wrapper exits with an error exit code or crashes then the service recovery features can be used to restart the Wrapper just like any other service. Cheers, Leif |
|
From: Leif M. <le...@ta...> - 2004-07-13 16:01:29
|
Alex,
Yup, this is a known bug that has been fixed in 3.1.1. I had been
hoping to get a point
release out fairly quickly but have run into some problems on FreeBSD.
Thanks to the
help of a couple users, I think we just about have that solved. So a
release should be coming
along soon.
In your direct email, you mentioned a link to a development build.
I do not usually keep
such builds up for long as I can not support them. It sounds like you
are stuck so I put up
the latest snapshot build for you to use. Please be sure to upgrade to
the release as soon
as it is out. I am using this build without any problems, but it should
not be considered
well tested. Do let me know about any problems you find and be sure to
read over the
change log.
http://wrapper.tanukisoftware.org/tmp/3.1.1e/wrapper_win32_3.1.1e.zip
You also asked why the Wrapper did not restart when it encountered
this crash. The
fact of the matter is that this was a very fatal crash that the Wrapper
was not able to recover
from. It is not possible for the Wrapper to restart itself, it is only
capable of restarting the
JVM. Normally the Wrapper does not crash. The tick timer was labeled
as experimental
for exactly this reason until it could be well tested. It seems to be
quite stable in 3.1.1 now.
But it will not become the default timer until it has undergone much
more testing by the
user base.
Alex Kritikos wrote:
> Hi,
>
>
>
> We are using wrapper 3.1.0 with the tick based timer. In one of our
> production servers we get random crashes with the following in the log:
>
>
>
> DEBUG | wrapperp | 2004/07/09 11:50:31 | send a packet PING : ping
>
> INFO | jvm 1 | 2004/07/09 11:50:31 | Received a packet PING : ping
>
> INFO | jvm 1 | 2004/07/09 11:50:31 | Send a packet PING : ok
>
> DEBUG | wrapperp | 2004/07/09 11:50:31 | read a packet PING : ok
>
> DEBUG | wrapper | 2004/07/09 11:50:31 | Got ping response from JVM
>
> INFO | jvm 1 | 2004/07/09 11:49:11 | The system clock fell behind
> the timer by 83700ms.
>
> FATAL | wrapper | 2004/07/09 11:49:11 | encountered a fatal error in
> Wrapper
>
> FATAL | wrapper | 2004/07/09 11:49:11 | exceptionCode =
> EXCEPTION_ACCESS_VIOLATION
>
> FATAL | wrapper | 2004/07/09 11:49:11 | exceptionFlag =
> EXCEPTION_NONCONTINUABLE_EXCEPTION
>
> FATAL | wrapper | 2004/07/09 11:49:11 | exceptionAddress = 0040E42A
>
> FATAL | wrapper | 2004/07/09 11:49:11 | Write access exception to
> 00000000
>
> FATAL | wrapper | 2004/07/09 11:49:11 | Fatal error in the Timer thread.
>
>
>
> This is a win2k box using JDK 1.3.1
>
>
>
> Attached is our conf file
>
>
>
> I have read in the bugs section about other people experiencing this
> and you provided a dev version for testing. Unfortunately the links
> are broken now, so I was wondering If this has been fixed and if so on
> what release etc. Also is there a tactical solution to stop the crashes?
>
> We can not stop using the tick timer as we always get the restart
> problem due to the system clock falling behind quite a lot. The
> machine has an ntp client synchronizing every 10 mins.
>
>
>
> Thanks,
>
>
>
> Alex Kritikos
>
|
|
From: Alex K. <al...@kr...> - 2004-07-13 12:15:00
|
#******************************************************************** # Wrapper Properties #******************************************************************** # Java Application wrapper.java.command=D:\Nirvana2.0.3506\jre/bin/java # Java Main class. This class must implement the WrapperListener interface # or guarantee that the WrapperManager class is initialized. Helper # classes are provided to do this for you. See the Integration section # of the documentation for details. wrapper.java.mainclass=com.pcbsys.nirvana.server.ServerService # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=D:\Nirvana2.0.3506/classes wrapper.java.classpath.2=D:\Nirvana2.0.3506/lib/nServer.jar wrapper.java.classpath.3=D:\Nirvana2.0.3506/lib/wrapper.jar wrapper.java.classpath.4=../data # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=. # Java Additional Parameters wrapper.java.additional.5="-DDATADIR=D:\Nirvana2.0.3506\server\nirvana\data" wrapper.java.additional.6=-DREALM=nirvana wrapper.java.additional.7=-DLOGLEVEL=2 wrapper.java.additional.8=-DLOGSIZE=10000000 wrapper.java.additional.9=-DSECURITYFILE=secfile.txt #wrapper.java.additional.10=-server wrapper.use_system_time=FALSE wrapper.timer_slow_threshold=10 wrapper.timer_fast_threshold=10 wrapper.debug=true wrapper.max_failed_invocations=1 wrapper.native_library=NirvanaRealmService # Initial Java Heap Size (in MB) wrapper.java.initmemory=65MB # Maximum Java Heap Size (in MB) wrapper.java.maxmemory=70MB # Application parameters. Add parameters as needed starting from 1 #wrapper.app.parameter.1= #******************************************************************** # Wrapper Logging Properties #******************************************************************** # Format of output for the console. (See docs for formats) wrapper.console.format=PM # Log Level for console output. (See docs for log levels) wrapper.console.loglevel=INFO # Log file to use for wrapper output logging. wrapper.logfile=NirvanaRealmService.log # Format of output for the log file. (See docs for formats) wrapper.logfile.format=LPTM # Log Level for log file output. (See docs for log levels) wrapper.logfile.loglevel=INFO # Maximum size that the log file will be allowed to grow to before # the log is rolled. Size is specified in bytes. The default value # of 0, disables log rolling. May abbreviate with the 'k' (kb) or # 'm' (mb) suffix. For example: 10m = 10 megabytes. wrapper.logfile.maxsize=100000000 # Maximum number of rolled log files which will be allowed before old # files are deleted. The default value of 0 implies no limit. wrapper.logfile.maxfiles=10 # Log Level for sys/event log output. (See docs for log levels) wrapper.syslog.loglevel=FATAL #******************************************************************** # Wrapper NT Service Properties #******************************************************************** # WARNING - Do not modify any of these properties when an application # using this configuration file has been installed as a service. # Please uninstall the service before modifying this section. The # service can then be reinstalled. # Name of the service wrapper.ntservice.name=Nirvana_Realm_nirvana # Display name of the service wrapper.ntservice.displayname=Nirvana_Realm_nirvana # Description of the service wrapper.ntservice.description=my-Channels Nirvana Realm nirvana # Service dependencies. Add dependencies as needed starting from 1 wrapper.ntservice.dependency.1= # Mode in which the service is installed. AUTO_START or DEMAND_START wrapper.ntservice.starttype=AUTO_START # Allow the service to interact with the desktop. wrapper.ntservice.interactive=false |
|
From: Oded B. <Ode...@in...> - 2004-07-13 07:16:07
|
Thank you. Actually my problem was a stupid classpath problem, and was solved. =20 Thanks again for your responses. Oded -----Original Message----- From: wra...@li... = [mailto:wra...@li...]On Behalf Of Jennifer = Kolar Sent: ?? 13 ???? 2004 4:36? To: wra...@li... Subject: Re: [Wrapper-user] Log4J problem. I use log4j and the wrapper logging togther.=20 You need to have atleast INFO level logging enabled in the wrapper = config file to get messages from the inner wrapped application.=20 I have used the SysLog, Console and RollingFile appenders w/ no issues.=20 You should see in effect duplicate logging- logging specified in the = wrapper conf file and any logging you specify in the log4j.xml file.=20 Jennifer=20 On Jun 21, 2004, at 9:35 PM, Leif Mortenson wrote:=20 Oded,=20 What version of the Wrapper are you using?=20 Starting with 3.1.0, the WrapperManager overrides the System.out and = System.err=20 print streams with wrapper streams. This was necessary to implement some = logging=20 features.=20 This should not have affected log4j as it should simply make use of the = wrapped=20 streams as usual. Other programs that do the same thing have been = working=20 correctly.=20 I am not a log4j user myself. If you could write up a very simple java = program=20 which demonstrates this problem then I will try running it both with and = without the=20 Wrapper and attempt to find out where the problem, if any, is. Getting = me a=20 sample program helps out a lot as 95% of the time tracking down such = problems=20 is often taken figuring out how to set up the test case.=20 Cheers,=20 Leif=20 Oded Blayer wrote:=20 I am trying to use Java Service Wrapper on an application that uses = log4j.=20 The problem I encounter is that all of my log messages are going = directly into the wrapper log, instead of the logs I specified in my = log4j.xml config file.=20 Is there any reason that the wrapper will override the Log4J?=20 Is there a log4J.xml to the wrapper, to which I can add my appenders?=20 -------------------------------------------------------=20 This SF.Net email sponsored by Black Hat Briefings & Training.=20 Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital = self defense, top technical experts, no vendor pitches, unmatched = networking opportunities. Visit www.blackhat.com=20 _______________________________________________=20 Wrapper-user mailing list=20 Wra...@li...=20 https://lists.sourceforge.net/lists/listinfo/wrapper-user=20 |