File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Run Two instance of Tomcat 4.1 on one Machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Run Two instance of Tomcat 4.1 on one Machine" Watch "Run Two instance of Tomcat 4.1 on one Machine" New topic

Run Two instance of Tomcat 4.1 on one Machine

Satya Narayan

Joined: Jun 18, 2008
Posts: 6
Hi to all...

I want to run two instance of Tomcat 4.1 in one Machine.

I did the following step to complete the task but it give error.

Step 1: install tomcat 4.1
tomcat folder : C:\Apache Group\Tomcat 4.1\

Step 2: copy & paste tomcat folder in same parent folder and rename it Tomcat2 4.1
tomcat folder : C:\Apache Group\Tomcat_2 4.1\

Step 3: Download service.bat file.
Put service.bat file in folder : C:\Apache Group\Tomcat_2 4.1\bin\service.bat

Step 4: Change all required port of second instance of Tomcat.
Edit all required port in file server.xml

Path: C:\Apache Group\Tomcat_2 4.1\config\server.xml

(1) Change the port on the root Server element to a different number (e.g. 8006)
(2) Change the port attributes on the Connector elements to a different number (e.g. 8010 instead of 8009, 8081 instead of 8080
and 8444 instead of 8443)

Step 5: To install service of second Tomcat run below command.
C:\Apache Group\Tomcat_2 4.1\bin>service.bat install ApacheTomcat2

It will install service succesful. Add service name also in service list. ie:ApacheTomcat2
But when we run service from it gives error in stdout.log file and tomcat manager does not run (ie: http://localhost:8081/).

Error in stdout.log file
Bootstrap: Create Catalina server
org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(
at org.apache.commons.logging.LogFactory.getFactory(
at org.apache.commons.logging.LogFactory.getLog(
at org.apache.commons.digester.Digester.<init>(
at org.apache.catalina.startup.Catalina.createStartDigester(
at org.apache.catalina.startup.CatalinaService.load(
at org.apache.catalina.startup.CatalinaService.load(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.BootstrapService.init(
at org.apache.catalina.startup.BootstrapService.main(
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(
... 12 more
Bootstrap: Starting service
Bootstrap: Service started

Step 6: To remove service of second Tomcat run below command.
C:\Apache Group\Tomcat_2 4.1\bin>service.bat remove ApacheTomcat2

Can any one tell, What is Problem? Which step is wrong & where?


Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Satya YYY

Please check your private messages regarding an important administrative matter.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
I agree. Here's the link:
subject: Run Two instance of Tomcat 4.1 on one Machine
It's not a secret anymore!