Classic JVM hangs when running Tomcat as Windows Service

Hi!
I am running a Tomcat 3.2.4 application, written with Java 1.3.1_01.
To run it as a Windows Service (W2000), I am using a slightly altered version of JavaService, which works fine so far: I can use both the "hotspot" and the "server" JVM's (by selecting the jvm.dll from the respective subfolder of the JDK/jre/bin folder).
However, when I try to run the same application with the "classic" JVM, the service starts, inside of it Tomcat starts, the first output appears (to the stdout logfile) and after some time Tomcat simply hangs - it doesn't respond to anything anymore, 0% CPU, no output to logfiles anymore, doesn't even respond to normal Tomcat shutdown (e.g. when stopping the service, Windows waits the standard timeout then just kills it).
Using the classic JVM in a console (e.g. not through JavaService and the classic/jvm.dll) works fine! No problems!
Anyone here who can offer any help on this?
Any hints why Tomcat may behave correctly in 5 out of six possible configurations (hotspot-server/client as service or console or classic as console) but hanging with 1 configuration (classic as service)?
Also, on my W2000 box where this happens, the moment Tomcat hangs, I hear a Windows warning sound being played (the standard warning gong), like it happens when an info dialog pops up - only there is no dialog or whatever and the same moment Tomcat's CPU usage drops to 0% (although the app is still in startup and should do some more work for a few seconds).
This also doesn't always happen at the same moment during startup, but each time at a different moment, e.g. I can not pin it down to something that is done during startup, it just happens a short while (sometimes earlier, sometimes later) after startup...
Of course, I could simply say "forget classic, it's being phased out anyway", only: The SAME thing happens with IBM's Java 1.3 VM too (except for the gong sound, which seems to be Sun-JVM specific ;-)! And I would very much like my app to be able to run on IBM's VM (usually I'm using Sun's VMs everywhere, but we have a few stray W2000 boxes with SP2 where Sun's 1.3.1_0x VMs crash with our application [not hang like described above, but really crash, even when run as a console]) and on those boxes the IBM JVM in a console works fine - now I only have to get it working as a service too (and while researching why it hangs I saw that Sun's classic JVM hangs too, so I figured, I first find out why that happens, with the hope that the fix is applicable to IBM's JVM too...).
Thanks already,
Johannes

re setting classpath when using JavaService
for Win2k, Tomcat 3.3.1a, JDK1.2
below is my script for creating/installing JavaService
(based on Alexandria web site version). However, if i
try to add .jar files to classpath (ie, CP environment
variable), the service does not work. It only works
when this single .jar file is there. How can .jar or
.zip files be added to classpath for this service?
I've not been working with Tomcar as a service, so can't help directly, but can offer some comments that might be of use (apologies if they aren't!).
There are Tomcat scripts for V3.1, V3.2 and V4 with the JavaService code from Alexandria SC. Looks like you need one for V3.3 as well?
In these others, there are fairly long lists of jar files in the classpath, so I would expect it to work correctly for the version you are using (unless there is a problem with the way that classloaders are involved, which is something that is known to get in the way for some app server-based programs).
I would expect the classpath to work if changed from what you have listed to something like the following:
set CP=%TOMCAT_HOME%\lib\tomcat.jar;%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME$\lib\other_library.jar
Is that what you have tried to do, and found problems?
Does this version of Tomcat bundle all of its resources into a single jar file (tomcat.jar), or is that a file you have created yourself?
Is the problem found when loading and starting Tomcat itself, or from within your server-based application?
Does it fail to load a 'standard' Tomcat library archive, or a jar file containing your own program code?
set CP=%TOMCAT_HOME%\lib\tomcat.jar
echo %CP%
JavaService.exe -install "Jakarta-Tomcat"
%java_home%\jre\bin\classic\jvm.dll
-Djava.class.path=%CP% -Dtomcat.home=%TOMCAT_HOME%
-Djava.security.policy=%TOMCAT_HOME%/conf/tomcat.policy
-Xms128m -Xmx128m -start
org.apache.tomcat.startup.Main -params start -stop
org.apache.tomcat.startup.Main -params stop -out
%TOMCAT_HOME%\logs\stdout.log -err
%TOMCAT_HOME%\logs\stderr.log
Regards,
John Rutter

Similar Messages

  • Shutdown hook not getting called when running tomcat as a service

    I have a shutdown hook as part of a lifecycle <Listener> tomcat6 class, which gets created and registered in the class's constructor (class is referenced in the server.xml). The hook gets called during shutdown when tomcat has been started from a shell, but not when tomcat has been installed as a service. The -Xrs flag doesn't make a difference either way. I am running java 6u12 server VM (haven't tried client) and prior versions. Does anyone have any ideas? This has been tested by starting/stopping from the Control Panel, and also with 'tomcat6 //TS/ServiceName' (i.e. in test mode)
    One possibility is that tomcat internally calls Runtime.halt(), but the shutdown process appears to be normal and the same with either scenario. The other possibility is that the JVM has an issue. The tomcat user groups don't have anything to offer.
    Thoughts?
    tia

    sanokistoka wrote:
    jschell wrote:
    sanokistoka wrote:
    Let me ask the last question in a better way: Does anyone have any GOOD ideas?Get back to us when you have found your good solution.Stop wasting bandwidth. I didn't post here to be a smart ars like you and pretend that I have a solution to a rare problem... FYI - the workaround is to use the tomcat lifecycle events (AFTER_STOP_EVENT) to achieve the same - why do you think I mentioned it's a tomcat listener in the first place? Feel free to educate me.
    So you are claiming that Runtime.getRuntime().addShutdownHook() that you posted in the above is not part of the java API?
    Or perhaps that everything that is added via addShutdownHook() runs?
    Surely you are not claiming that it isn't calling addShutdownHook() in the first place?
    Get a life and a job.I have both but thanks for the concern.
    sanokistoka wrote:
    swamyv wrote:
    There are free tools available to debug windows. I think gdb is one of them. If you search you can find some good tools.
    If you find any good tools that you like share it with us.
    Yes I will try gdb (have cygwin) and see where this takes us - not sure if the JVM or tomcat6.exe have the symbols to get a meaningful stack trace. As luck would have it, [https://issues.apache.org/bugzilla/show_bug.cgi?id=10565|https://issues.apache.org/bugzilla/show_bug.cgi?id=10565] claims that "shutdown hooks are not supported in a container environment" although there is no such restriction in the servlet spec, which would make this a tomcat issue (it does sound like that tomcat6.exe wrapper is somehow involved). Unfortunately, tomcat does NOT issue the AFTER_STOP_EVENT if killed before it has completed its start-up (it appears its own shutdown hook, which sends the event, is not registered until it has fully come up); thus the need for a shutdown hook (at least, up until it's fully up). A shutdown hook is still required in my case for clean-up after tomcat is completely out of the picture. It sounds like the proper architecture here is to really embed tomcat in an application, and create a shutdown hook at the outer level.
    Educate me some more. The above description certainly seems like you are suggesting that both of the following are true.
    1. It is not a bug in the VM.
    2. The problem, for your implementation, is in how the wrapper terminates the windows service.
    Perhaps what is actually happening it that addShutdownHook() is never being called at all? Thus of course any processing of the thread associated with that would never, ever run.
    And that happens because you are banging on the stop service so fast that it doesn't actually have time to spin up?

  • Different thread/memory limits when running Java via Windows Service?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

  • Windows 2003 R2 Server hangs when starting Oracle 9.2 service

    Hi,
    I've been having an error with an Oracle 9.2.0.7 installation where the server will hang to the point where it needs to be powered off as it is completely unresponsive. It hangs when I start the Oracle service.
    I've tried installing the system from scratch a few times(OS, OS patches, Oracle 9.2, Oracle 9.2.0.7 Patch set, Database) a few times however I keep having this same issue issue. I had the system running properly up until yesterday and I thought the issue was SP2 for Windows 2003 as I didn't patch the OS before installing everything however it is happening again now.
    The listener is started and I can't even connect to an Idle instance through SQLPlus when this happens. I just get a TNS Listener error which I will list below. SInce this keeps happening, I'm wondering if it may be a hardware issue (Installed on an HP ML350) but I'm also wondering if it may be SP2 for WIndows 2003 server and was wondering if anyone else has seen this issue. I havne't found anything in the forum nor on Google so I thought I'd post here.
    Here are the last entries in the DB log when it hangs;
    ARC1: Archival started
    Mon Mar 10 14:18:59 2008
    ARCH: STARTING ARCH PROCESSES COMPLETE
    Mon Mar 10 14:18:59 2008
    ARC0: Becoming the 'no FAL' ARCH
    Mon Mar 10 14:18:59 2008
    ARC1: Becoming the heartbeat ARCH
    Mon Mar 10 14:18:59 2008
    ARC0: Becoming the 'no FAL' ARCHARC0: Thread not mounted
    Mon Mar 10 14:18:59 2008
    ARC1: Becoming the heartbeat ARCHARC1: Thread not mounted
    Mon Mar 10 14:19:00 2008
    Oracle Data Guard is not available in this edition of Oracle.
    Mon Mar 10 14:19:00 2008
    alter database mount exclusive

    Hi,
    Since the server locks up when the service is starting, it's hard to determine how high it gets but after it starts, it quickly gets up to around 277MB and just stays there.
    I was thinking it may be a memory issue as well as it displays the symptoms of a "light speed" memory leak. I had 4GB of memory in the server and realized that WIndows 2003 only saw 3.5GB so I decided to remove 1 GB but that didn't make a difference.
    How would I go about ensuring that the memory consumption on my DB server does not get swapped much?

  • FYI: New version of Disk Warrior seems to hang when run with Snow Leopard

    FYI: It seems that the new version of Disk Warrior hangs when run in Snow Leopard

    I have been using DW 4.2 on 10.5.8 and the speed-up was the first thing I noted, too, so it isn't just SL.
    Now if it would only 'come up for air' and respond to input to move window (so I can put it where I can see it if needed) I'd like that.
    There is a 23 page review of Snow Leopard on Ars. On page 22:
    People sometimes ask what, exactly, is wrong with HFS+.
    Aside from its obvious lack of the features just listed, HFS+ is limited in many ways by its dated design, which is based on HFS, *a twenty-five year-old file system.*
    To give just one example, the centrally located Catalog File, which must be updated for each change to the file system's structure, is a frequent and inevitable source of contention. Modern file systems usually spread their metadata around, both for robustness (multiple copies are often kept in separate locations on the disk) and to allow for better concurrency.
    Practically speaking, think about those times when you run Disk Utility on an HFS+ volume and it finds (and hopefully repairs) a bunch of errors. *That's bad, okay?* +*That's something that should not happen*+ with a modern, thoroughly checksummed, always-consistent-on-disk file system unless there are hardware problems (and a ZFS storage pool can actually deal with that as well). And yet it happens all the time with HFS+ disks in Mac OS X when various bits of metadata to get corrupted or become out of date.
    Apple gets by year after year, tacking new features onto HFS+ with duct tape and a prayer, but at a certain point there simply has to be a successor—whether it's ZFS, a home-grown Apple file system, or something else entirely. My fingers are crossed for Mac OS X 10.7.
    If Disk Utility was reliable in mapping out weak sectors (it is not) and report/log errors. But it doesn't and I trust my data to other file systems when possible. We've come to expect and depend on 3rd party utilities and that Apple First Aid doesn't fix every possible error.
    Scanning one drive for errors can take a long time. Maybe it needs to be done, maybe in the background. With 2TB drives it gets worse. Spending hours to scan for errors??? I've set TechTool Pro to concurrently scan anywhere from one to a dozen volumes at once.
    An ounce of prevention, as they say, is worth a pound of cure.

  • My Macbook Pro has a black screen when running in Bootcamp Windows 7. Since I updated the mac side my windows side now starts up with completely black screen - no prompt, nothing, Cap keys still light up as does mouse and DVD drive seems to run.

    My Macbook Pro has a black screen when running in Bootcamp Windows 7. Since I updated the mac side my windows side now starts up with completely black screen - no prompt, nothing, Cap keys still light up as does mouse and DVD drive seems to run.
    Will not show up in safe mode, will not show when started from Windows 7 DVD.
    I suspect the Mac update wiped out my PC video drivers but can not think of a way to re-install?
    Can see the PC volume from Mac side with files.
    I've looked at all the online solutions so far and have tried most of them without success. Please help!
    Specs:
    2009 Macbook Pro, 3.06 GHz Intel 2 core, Max 10.6.8.
      Model Name:          MacBook Pro
      Model Identifier:          MacBookPro5,2
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          3.06 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache:          6 MB
      Memory:          4 GB
      Bus Speed:          1.07 GHz
      Boot ROM Version:          MBP52.008E.B05
      SMC Version (system):          1.42f4
      Serial Number (system):          7302300GANE
      Hardware UUID:          B2D4B4B4-CD92-5C7A-BDC2-527D30DD8DF3
      Sudden Motion Sensor:
      State:          Enabled

    EDIT: RESOLVED
    For anyone else who finds their way here like I did, this link did it for me: https://forums.geforce.com/default/topic/527599/windows-8-issues-solved-please-r ead-if-you-39-re-having-black-screen-and-or-flickering-/
    Specifically, the posts by Dunsany and valkyr did the trick.  I booted in safe mode, uninstalled and deleted the Nvidia driver, disabled automatic driver installation, and restarted normally.  I then manually downloaded and installed the previous Nvidia driver for my graphics card (which at the time of this writing was 335.23, rather than the latest which was 337.88), and everything is now bueno!
    Two hiccoughs along the way: First, when I tried to uninstall the Nvidia driver the first time, when I restarted I got the login screen (which was a good sign), but it quickly went black again.  I powered down, restarted in safe mode again, and repeated the uninstallation process, and it worked the second time.  Second, when I started the manual install of the 335.23 driver, the computer played a sound similar to the one for disconnecting a USB device, and the screen went black.  I'd seen a lot about trying to increase the brightness (though it hadn't worked up to this point; but if you haven't tried it yet, might as well); I tried it, and it worked! So far I'm back up and running. [/fingers crossed]
    Hope this helps someone else!

  • How much memory/RAM can I put into my HP Compaq 8710p when running 64-bit Windows 7?

    How much memory/RAM can I put into my HP Compaq 8710p when running 64-bit Windows 7?
    This question was solved.
    View Solution.

    The maximum supported is 8 GB.
    The Maintenence and Service guide for the Compaq 8710p
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Hang when running program

    I am getting a hang when running my java program. Part of the stacktrace is below. I see an 'overflowEi' in the trace. Is that the problem? What does that mean. Thanks in advance!!
    3HPNATIVESTACK Native Stack of "Thread-19" PID 5753
    NULL -------------------------
    3HPSTACKLINE _hpiThreadHardSuspend at B73B51B0 in libhpi.so
    3HPSTACKLINE ?? at B73A85BB in libhpi.so
    3HPSTACKLINE ?? at B73A87C0 in libhpi.so
    3HPSTACKLINE ?? at BB4F80 in libpthread.so.0
    3HPSTACKLINE ZNSt12_basic_fileIcE6xsputnEPKci at 419F37 in libstdc++.so.5
    3HPSTACKLINE ZNSt13basicfilebufIcSt11char_traitsIcEE22_M_convert_to_externalEPciRiS4_ at 3D01CF in libstdc++.so.5
    3HPSTACKLINE ZNSt13basic_filebufIcSt11char_traitsIcEE18_M_really_overflowEi at 3CFF74 in libstdc++.so.53HPSTACKLINE ZNSt13basicfilebufIcSt11char_traitsIcEE8overflowEi at 3CFE8E in libstdc++.so.5
    3HPSTACKLINE ZNSt15basicstreambufIcSt11char_traitsIcEE6xsputnEPKci at 4091B4 in libstdc++.so.5
    3HPSTACKLINE ZNSt13basicfilebufIcSt11char_traitsIcEE6xsputnEPKci at 3D0708 in libstdc++.so.5
    3HPSTACKLINE _ZNSo5writeEPKci at 3FFBB1 in libstdc++.so.5
    3HPSTACKLINE ZStlsISt11chartraitsIcEERSt13basic_ostreamIcT_ES5_PKc at 4002C6 in libstdc++.so.5
    3HPSTACKLINE ZN6Cronus14mergeRepairsBiEv at B3F5B3CD in libExerciserServerjni56330.so
    3HPSTACKLINE ZN14BurninAbistDD23runEv at B3F1C39B in libExerciserServerjni56330.so
    3HPSTACKLINE ZN15ExerciserServer3runEv at B3EFBFCE in libExerciserServerjni56330.so
    3HPSTACKLINE Java_com_ibm_austin_tex_control_exerciserServer_ExerciserServer__1_1m11 at B3EF1270 in libExerciserServer_jni56330.so
    3HPSTACKLINE B31519AB
    3HPSTACKLINE L0_invokevirtual_quick_w__ at B7574127 in libjvm.so
    3HPSTACKLINE L0_invokevirtual_quick__ at B75736CC in libjvm.so

    No answers, but some more questions:
    Before diving into the JNI stack trace, what does "hang" mean? Are there other threads running in your program? Is this the main thread?
    Looking at the stack -- and Googling libhpi.so didn't turn up much for me, other than similar complaints -- it looks like it's an output routine. What are you writing to? A local disk, or one that's remote mounted?
    Edit: absolute speculation here, but I suspect that it's a routine that's called when an in-memory buffer's full, in order to physically write the data onto whatever medium you're writing too. So probably not worth looking for an actual "buffer overflow" that's damaging memory.

  • As the current one hangs when run

    Trying to obtain orderline data for the Credit Memo project that produces examples where the quantity results in a fraction, using the following formula:
         (Draft Revenue Amount - Invoiced Amount)/ Selling Price
    As the current one hangs when run
    select distinct order_number,l.LINE_NUMBER
    ,l.DRAFT_REVENUE_AMOUNT, l.INVOICED_AMOUNT,l.SELLING_PRICE,ol.ATTRIBUTE2 end_date
    ,l.DRAFT_REVENUE_AMOUNT- l.INVOICED_AMOUNT diff,
    (nvl(l.DRAFT_REVENUE_AMOUNT- l.INVOICED_AMOUNT,0)/nvl(decode(l.SELLING_PRICE,0,1,l.SELLING_PRICE),1)) quantity
    from xxrr_so_headers_all h, xxrr_so_schedules_all s
    ,xxrr_so_lines_all l,apps.oe_order_lines_all ol
    where h.HEADER_ID=l.HEADER_ID
    and l.LINE_ID=s.LINE_ID
    and l.ORDERED_QUANTITY-l.CANCELLED_QUANTITY<>0
    and nvl(l.DRAFT_REVENUE_AMOUNT,0)- nvl(l.INVOICED_AMOUNT,0) <>0
    and to_date(ol.ATTRIBUTE2)between '01-JAN-2007'and sysdate
    Thanks

    select distinct order_number,l.LINE_NUMBER,
           l.DRAFT_REVENUE_AMOUNT,
           l.INVOICED_AMOUNT,
           l.SELLING_PRICE,
           ol.ATTRIBUTE2 end_date ,
           l.DRAFT_REVENUE_AMOUNT- l.INVOICED_AMOUNT diff,
           (nvl(l.DRAFT_REVENUE_AMOUNT- l.INVOICED_AMOUNT,0)/nvl(decode(l.SELLING_PRICE,0,1,l.SELLING_PRICE),1)) quantity
      from xxrr_so_headers_all h,
           xxrr_so_schedules_all s ,
           xxrr_so_lines_all l,
           apps.oe_order_lines_all ol
    where h.HEADER_ID = l.HEADER_ID
       and l.LINE_ID   = s.LINE_ID
       and (l.ORDERED_QUANTITY-l.CANCELLED_QUANTITY) <> 0
       and (nvl(l.DRAFT_REVENUE_AMOUNT,0)- nvl(l.INVOICED_AMOUNT,0)) <> 0
       and to_date(ol.ATTRIBUTE2) between '01-JAN-2007' and sysdateit's not hanging but trying to return all the rows from your apps.oe_order_lines_all table. since your query does not have any conditions on the WHERE clause that would relate it to your so_headers_all table.
    try to add something like:
         and h.header_id = ol.header_id

  • Sudo command hangs when run as winbind user

    Hi,
    It even hangs when running:
    $ sudo
    or
    $sudo -V
    So nothing to do with my sudo config - have reverted /etc/sudoers back to default. Even control-c does not work and the process needs to be killed as root, using another session.
    The command works fine when ran as a local user. It is only when running as a winbind user that there's a problem.
    Any help on what tools can be used to find out what's happening while the command is hanging would be much appreciated. Or even better any ideas on how to stop it hanging would be even better!
    Can provide any config files if they help anyone.......
    Many Thanks,
    Richard

    *** UPDATE ***
    It seems the version of sudo (v1.8*) supplied with Solaris 11 is not compatible with Winbind users.
    Workaround:
    Compile version 1.7* to /usr/local/bin and add this to the beginning of $PATH

  • How do you create a program in Labview that can be run as a Windows Service?

    I would like to create a Labview program that can be run as a Windows service.  I have read the following Knowlegebase articles and have done what they say. 
    Creating a Windows NT Service Using LabVIEW http://www.ni.com/white-paper/3185/en 
    Running a LabVIEW Application as a Windows NT/2000/XP/Server 2008/7  User-Defined Service http://digital.ni.com/public.nsf/allkb/21BA0F671A63A60386256CB4004DF99B
    When trying to start the service I get an error that says the program didn't respond to the start in a timely manner.  I also set the "run when opened" parameter in the VI.  I am programming in Labivew 2010, proffesional version.  The server is running Windows Server 2008.  Can anyone help?  Is the ini file important in Windows Server 2008?

    I haven't looked through all those links.  But I have created Windows Services from LabVIEW executables way back when WinXP came on the market.
    The problem with services is that they have no UI.  So you can't really see what is going on.  Your EXE might be failing or hanging due to some kind of error (most liklely a security/permissions error), but you can't see the error.  So my advice is to either:
    1.  Have your EXE write lots of info to a log file.  Write info that log every step in the application.  If an error ocurrs, have it write the error info to the log file.  That is a very useful debugging tool.
    2.  Use VI Server functions to monitor the service to see what is going on. 

  • Tomcat as windows service

    Hi everybody,
    Im trying to make Tomcat (5.0.25) run as a windows service. I tried using service.bat, which installs a windows service of type manual. As this is for client machines, setting the service type to automatic is not an option. So what I am looking for is either a way to use service.bat to create an automatic windows service, or a way to change a services type from manual to autmatic.

    Ignore my last post about the options. As of August 16, 2004, the page is out of date and the options are incorrect for the verison shipped with Tomcat 5.0.27.
    However, to find out how to use tomcat5.exe, look at the "service.bat" file in the bin directory. This wraps a call to it with the most common options you will need. I had some troubling customizing the script (using Tomcat 5.0.27) for my own needs, but eventually figured it out (with much help from posts on the Tomcat newsgroups.)
    The changes I made were:
    1) To allow allow compilation of JSPs, changed PR_CLASSPATH to include J2SDK tools.jar:
    Before
    set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar
    After
    set PR_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar2a) To use a specific JVM location, changed jvm option from 'auto'
    2b) To make service automatic instead of manual, added Startup option
    2c) To use customized server.xml file and pass multiple parameters to StartClass, changed StartParams by separating additional values by semi-colons:
    Before
    "%EXECUTABLE%" //IS//%SERVICE_NAME% --Jvm auto
    --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap
    --StartParams start --StopParams stop
    After
    "%EXECUTABLE%" //IS//%SERVICE_NAME% --Jvm "%JAVA_HOME%\jre\bin\server\jvm.dll"
    --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap
    --StartParams "-config;%CUSTOM_SERVERXML_FILE%;-nonaming;start" --StopParams stop
    --Startup Automatic3) To specify min and max memory limits, added extra jvm startup parameters
    Before
    "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions
    "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"
    --StartMode jvm --StopMode jvm
    After
    "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions
    "-Xms128M;-Xmx256M;-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"
    --StartMode jvm --StopMode jvm

  • Running Tomcat as a service

    I have two questions about running Tomcat as a service.
    First, when I try to install and start tomcat 3.3.2 with the java sdk 1.4.0 using jk_nt_service, the service won't start. When I execute the following command, jk_nt_service -S Tomcat-3.3-2-Dev, I get a response of Tomcat-3.3.2-Dev failed to start. When I execute the following command, net start Tomcat-3.3.2-Dev, I get a system error 1067 response. Does anyone know how to get around this error?
    Second, if we try to run Tomcat 4.1.27 as a service, we get very slow response compared to running startup.bat in the bin directory. Does anyone know why this is and what could be done to improve the performance?
    Jim Field

    I don't know the answer to the first question.
    Regarding the second one: when you say "slow response", do you mean for every request you send to the service compared to sending the same request to Tomcat started with startup.bat, or are you referring to just starting the service?
    Have you measured the response time for a number of requests to both the service and script-started Tomcat, or is this a subjective judgement? MOD

  • Run .jar as window services.

    Hi,
    I?ve tried running .jar using batch file in window scheduler. The program will auto end if we logoff from the OS(window server 2003).
    How can we run .jar as window services, beside using Java wrapper?
    Most window wrapper need license to execute. I will like to deploy this .jar as window services in our customer side.

    You have to chose the option while creating the task as "When my computer starts", this will work as soon system boots up and until the task is explicity stopped later. This works independent of user logging into the computer; as soon the machine boots up to windows.
    If you choose "When I login" during task scheduling, the task becomes active as log as you have logged on to that desktop.
    Hope this helps.

  • Recommendations for configuring DSEE 6.3.1 to run as a Windows service?

    Hi All, I need some recommendations for configuring DSEE to run as a Windows service. Currently I have CACAO, DSCC, and the Web Console configured and running as Windows services and this works fine. I would like to configure the directory itself to run as a Windows service so that it will restart automatically if the server reboots for any reason. Using dsadm enable-service --type WIN_SERVICE I configured this but initial testing indicated that the service will fail to start automatically on reboot. I can start it manually once the server is rebooted. This appears to indicate a dependancy of some sort with one of the other services like CACAO or DSCC but I did not see any documentation on this. Does anyone know the appropriate way to configure the directory to run as a Windows service? Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    There is an entry in the application-management-common-agent-container log
    [ Apr 22 09:17:52 Executing start method ("/opt/test/dsee6/cacao_2/usr/lib/cacao/lib/tools/scripts/cacao_smf start default") ]
    Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException:
    zone1: zone1
    Which was the problem. The zone was picking up a stale NIS map with the wrong hosname for its IP address.

Maybe you are looking for