Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
Author

Run Two instance of Tomcat 4.1 on one Machine

Satya Narayan
Greenhorn

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(LogFactory.java:558)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:355)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409)
at org.apache.commons.digester.Digester.<init>(Digester.java:352)
at org.apache.catalina.startup.Catalina.createStartDigester(Catalina.java:280)
at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:183)
at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:258)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:231)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:543)
... 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?

Thanks...





Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Satya YYY

Please check your private messages regarding an important administrative matter.

-Andrew


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: http://aspose.com/file-tools
 
subject: Run Two instance of Tomcat 4.1 on one Machine
 
Similar Threads
Unable to start manual configured tomcat service
multiple tomcat instances:Need Help
Problems installing Tomcat6 Service
Problem with TomCat
problem! BindException: JVM_Bind: 80