Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running multiple contexts

Status
Not open for further replies.

takisd

Programmer
Oct 12, 2002
2
AU
hi

i'm having a problem running more than one context using tomcat and apache. it all works fine on my standalone test/development box but when i uploaded the new second context to my server it didn't work.

in mod_jk.conf i have the following:

<VirtualHost 207.44.208.51:80>
ServerAdmin admin@mydoamin.com
DocumentRoot /usr/local/tomcat_4.1.18/webapps/firstapp
ServerName ServerAlias mydomain1.com
ErrorLog logs/mydomain1.log
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>

<VirtualHost 207.44.208.51:80>
ServerAdmin admin@mydoamin.com
DocumentRoot /usr/local/tomcat_4.1.18/webapps/secondapp
ServerName ServerAlias mydomain1.com
ErrorLog logs/mudoamin2.log
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>

and server.xml has the following:

<Context path=&quot;&quot; docBase=&quot;firstappbase&quot; debug=&quot;0&quot;
reloadable=&quot;true&quot; crossContext=&quot;true&quot;>
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
prefix=&quot;localhost_firstapp_log.&quot; suffix=&quot;.log&quot;
timestamp=&quot;true&quot;/>
</Context>

<Context path=&quot;&quot; docBase=&quot;secondappbase&quot; debug=&quot;0&quot;
reloadable=&quot;true&quot; crossContext=&quot;true&quot;>
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
prefix=&quot;localhost_secondapp_log.&quot; suffix=&quot;.log&quot;
timestamp=&quot;true&quot;/>
</Context>

if i comment out any of the contexts from server.xml it works (thats one if the other is commented). but for some reason both won't work and tomcat fails to start with the following:
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.IllegalArgumentException: addChild: Child name '' is not unique
...
Catalina.start: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException

i'm stumped... if anyone has any ideas at all, they would be most appreciated.

thanks heaps...

Takis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top