Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Problem with Multiple Instances with Tomcat

Peter Ng

2007-02-05


Hey all,

I'm having an issue when trying to run multiple instances of tomcat
per user. I have been trying to sort through the problem for a while
and I can't seem to understand why its giving me this issue. The
issue is upon starting tomcat up in a user directory

$CATALINA_HOME/bin/startup.sh -Dcatalina.base=/path/to/base

I have CATALINA_HOME, CATALINA_BASE, and JAVA_HOME set properly. i
get this exception:

Feb 5, 2007 5:24:37 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Parse error in application web.xml file at jndi:/localhost/
application/WEB-INF/web.xml
java.lang.ClassNotFoundException: org.apache.catalina.Container
     at
org.apache.tomcat.util.digester.Digester.createSAXException
(Digester.java:2725)
     at
org.apache.tomcat.util.digester.Digester.createSAXException
(Digester.java:2751)
     at org.apache.tomcat.util.digester.Digester.endElement
(Digester.java:1060)
     at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(
AbstractSAXParser.java:601)
     at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespace
Scope(XMLDTDValidator.java:2077)
     at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndEle
ment(XMLDTDValidator.java:2028)
     at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement
(XMLDTDValidator.java:901)
     at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canEndElement(XMLDocumentFragmentScannerImpl.java:1772)
     at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2923)
     at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
(XMLDocumentScannerImpl.java:645)
     at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFragmentScannerImpl.java:508)
     at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:807)
     at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:737)
...

It appears that there is something wrong with the webapps web.xml
file. But when I simply take that webapp and place it into the
$CATALINA_HOME webapps directory and fire tomcat up from
$CATALINA_HOME, it all works perfectly fine, including the servlet
that this exception seemingly fails on. So it appears that my
web.xml file is valid and working, along with my code.

Now I believe there is a classpath problem, because it works in the
$CATALINA_HOME dir, but not with the $CATALINA_BASE dir. I also
tried placing a copy of catalina.jar into my user directory libs and
I pass the problem above, but I get this exception instead:

SEVERE: Parse error in application web.xml file at jndi:/localhost/
numberlookup/WEB-INF/web.xml
java.lang.NoSuchMethodException:
org.apache.catalina.core.StandardContext addChild
     at
org.apache.tomcat.util.digester.Digester.createSAXException
(Digester.java:2725)
     at
org.apache.tomcat.util.digester.Digester.createSAXException
(Digester.java:2751)
     at org.apache.tomcat.util.digester.Digester.endElement
(Digester.java:1060)
     at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(
AbstractSAXParser.java:633)
     at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespace
Scope(XMLDTDValidator.java:2108)
     at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndEle
ment(XMLDTDValidator.java:2059)
     at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement
(XMLDTDValidator.java:932)


Any one have any suggestions? I have a feeling that its a simple
problem to fix, but I'm missing something.

Thanks a bunch!
Peter


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.