• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Tomcat as NTservice - problem.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have Tomcat 4.1.18 and am trying to run it as an Nt service. There are no problems with registering it as an Nt service or running it.
The problem is - I have a complex hierarchical structure that needs to be loaded into memory on webserver startup. As soon as this code is reached, there are many many NullPointerExceptions thrown.
Please note that running the same code in Tomcat 3.2.3 or on Tomcat 4.1.18 using the startup.bat do not pose these problems.
I have ( after a lot of head banging on my keyboard) found that setting
CATALINA_OPTS=-server as an environmental variable can instigate this problem no matter how I run Tomcat ( as NT service or as with startup.bat ).
I am lost!!! Any help is very much appreciated.
Thanks,
Minu.
[ March 13, 2003: Message edited by: Mrinalini Gudi ]
 
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure whether this is ths solution to your problem but may be...
By default Tomcat (when installed as service) considers the working directory something else (say c:\windows\system32 on my XP machine). I had this problem and so I specified the "working directory" using the "-current" parameter (after the -err parameter).
Try this and do let me know the outcome..
 
Mrinalini Gudi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Debashish. I was able to resolve this, but another problem.
When I try to register the NT service, I get these errors
1) The LoadLibrary function falied for the following reasons : a DLL initialization routine failed.
2) Could not load the JVM
3) The YYY service failed to start
(YYY is my NT service name)
I see these errors in the Event Viewer. Three entries in the viewer. Any idea why the JVM is not loaded...?
Regards,
Minu.
 
Debashish Chakrabarty
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mrinalini,
The problem may be due to the jvm.dll path that we pass to the service installer. I am not aware which jdk are us using. If you are using jdk1.3 then jvm.dll resides in jre/bin/hotspot folder of jdk installation for j2sdk1.4.x it's in jre/bin/server folder. Make sure you pass it correctly.
Also check the registry entry under HKEY_LOCAL_MACHINE/SYSTEM/Current Control Set/Services. VErify whether the parameters are exactly as you passed to tomcat.exe.
Hope this helps
 
Mrinalini Gudi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Debashish, Thanks a lot for you feedback.
The problem was with the permissions of the user loggeed in to register the service. He had leeser priviliges. I logged in as Administrator and was able to register the service.
Although, I am still stuck with the JVM heap size issue. Tried changing the heap size by
-server -Xmx256m ( tried both : by setting this as an environmental variable and in the setclasspath.bat), but somehow as soon as I set that -server option, my code throws multiple null pointer exceptins...
Wondering how to set(rather increase) the heap size for the JVM and know how much heap size the JavaService exe sets for the JVM.
Regards,
Minu.
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic