Run Tomcat as service, ManagedConnectionPools.xml not found

X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

I use Tomcat 4.0.3 and usually start it by calling “catalina.bat start” and it will start up my application.
Now I want to run Tomcat 4.0.3 as a Windows 2000 service. The problem is, it does not find the file ManagedConnectionPools.xml.
I wrapped this file into a jar which I call ManagedConnectionPools.jar and put it in my web-inf/lib directory. I also put this jar into the setclasspath.bat file.
The service is started by tomcat.exe. I also set the environment variable CLASSPATH which points to the jar files is use. The tomcat.exe does not seem to care about it, because it does not work.

Any hints?

Harald

At a guess I would say the problem is the jar file. The API looks for the xml file in classpath; it doesn’t look for a jar file.



The question is, where do you have to set the classpath. Tomcat only loads jar files when it starts up, not xml files. That’s why I put the xml file into a jar.

I use jk_nt_service to run Tomcat as a Windows 2000 service. The config changes for Connection Pooling are:

1) Create directory called resources under Tomcat_Home. Put ManagedConnectionPools.xml in there.

2) Change wrapper.properties; after line:
wrapper.class_path=$(wrapper.java_home)\lib\tools.jar
add:
wrapper.class_path=$(wrapper.tomcat_home)\resources

If you’re not sure where wrapper.properties is, use Regedit to look at key:
HKLM\System\CurrentControlSet\Services<yourTomcatservicename>\Parameters and check the setting of the PropertyFile string.

HTH

Hello,

I check the Internet for this problem. It seams to be that other developer too have the problem to start Tomcat as a Service.

I had a closer look at RE: Apache & Tomcat as Service on Win2k

However, I’m not sure if it solves your problem.

Bye,
Christian.

I remember a problem with services and network drives (e.g. \myserver\myshare) on Windows NT: the service doesn’t start if the JDK resides on a network drive. Is your jar file located on a network drive?

Michael

Software AG Germany, Darmstadt

Setting the CLASSPATH or adding the Jar file to your web-inf\lib probably doesn’t help. The CLASSPATH is not used by cataline.bat and Tomcat doesn’t load its own classes from web-inf directories.

If the service is started via cataline.bat, you could try to edit this file and added you jar file there.

Michael

Software AG Germany, Darmstadt



I solved the problem. Everything I heard about that problem so far was just a guess and did not work at all. I found out that Tomcat does read all .jar files from the web-inf\lib directory. Also ManagedConnectionPools.jar (which contains the xml file). But still, my application could not talk to Tamino. To solve this problem I had to put ManagedConnectionPools.jar into JAVA_HOME\jre\lib\ext. Then it will work. I am not sure whether this problem is a Tomcat problem…

But thanks for your help anyway…

Harald