Solved

Tomcat as Service and load a dll

Posted on 2004-08-16
9
333 Views
Last Modified: 2010-03-04
hi All,
I am running tomcat 4.1.29 as windows service.
The application which i am attempting to deploy on the server requires a dll to work.

When i run tomcat standalone , the app  runs just fine as it is able to find the dll.

But when i set it as the service , i get java.library.path error , basically meaning the application is not able to load the dll.

Does tomcat do something special when it runs as a service.

note: i have added dll to windows path.


Where else i need to do the setting so that service can load the also.

thanks in anticipation
Bhuvnesh Sharma
0
Comment
Question by:bhuvneshsharma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
9 Comments
 
LVL 9

Expert Comment

by:ronan_40060
ID: 11818829
Hello Bhuvanesh Sharma

Its the  jvm.dll that needs to be set  in the path so you need  search and correct the path for dll and things will work just fine.
When u make path chances you need  to first uninstall the service and then install it again
Ronan
0
 

Author Comment

by:bhuvneshsharma
ID: 11819536
Ronan,
the application requires a custom dll to work. I have already added that to the system path. Tomcat as a service does not recoganize that where as if running standalone it works fine.

it is not the issue with jvm.dll , because i think java setting are fine.

thanks for your help
Bhuvnesh
0
 
LVL 15

Assisted Solution

by:samri
samri earned 125 total points
ID: 11822042
hi bhuvneshsharma,

When you did mentioned about changing PATH, where exactly this is happening, in the tomcat startup or the Windows system path.  
.

Also check the tomcat startup -- forgot which one.  and check if there is an option to add %PATH% environment variable there.  Which I think it should.

Check this part out - On your windows desktop, right-click on "My computer", select "Properties", and  "Advanced" and choose "Environment Variable" button.  Locate the "System variable", and append the desired path to the line.  (I think this is what Ronan is talking about).

I hope this is what we are looking at.

Alternately, I would think adding a AUTOEXEC.BAT file, and Add the line "SET PATH=%PATH%;c:\new path;" should work. :)

worst case scenario, try to cross-post in Windows2000 (or like) TA. -- they got a bunch of Win* experts there..
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:bhuvneshsharma
ID: 11823051
thanks guys,
I kind of got it fixed , strange thing it was not able to find the dll if i ran the service with localsystem account. But in case i ran it with a account which had administrative rights to the machine, it worked fine.

Not sure what access rights on the machine are required for that. Still searching will let you know.:)

PS: I had already added the custom dll to PATH variable .

thanks
Bhuvnesh
0
 
LVL 9

Accepted Solution

by:
ronan_40060 earned 125 total points
ID: 11823667
Hello Bhuvnesh
run the following command to install tomcat as a service.

%CATALINA_HOME%\bin\tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\classic\jvm.dll" -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar" -Dcatalina.home="%CATALINA_HOME%" -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out "%CATALINA_HOME%\logs\stderr.log"

The above command will install tomcat as a service.
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12185663
Hello Periwinkle
Samri and I both tried to give the answers .
The points should be splitted and wud be given grade B atleast
regards
Ronan
0
 

Author Comment

by:bhuvneshsharma
ID: 12185682
Ronan,
I have split the points as suggested.


thanks for your help

Bhuvnesh Sharma
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question