File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes tomcat 1.4 commons-digester parse web.xml error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat 1.4 commons-digester parse web.xml error" Watch "tomcat 1.4 commons-digester parse web.xml error" New topic

tomcat 1.4 commons-digester parse web.xml error

Jo Liang

Joined: Dec 10, 2001
Posts: 11
I have problem running Java Sun J2EE tutorial examples on the tomcat-1.4.12. I believe the problem is tomcat has trouble reading web.xml. But since the web.xml is from Java example, I assume it is correct but something wrong with Tomcat.

Here is my system:
OS: WindowsNT
Java: java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Tomcat: tomcat-1.4.12

Once I add the example WAR file with web.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <web-app xmlns="" xmlns:xsi="" xsi:schemaLocation=" web-app_2_4.xsd" version="2.4">

When I start Tomcat and I get this error message:
Feb 25, 2003 11:56:08 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 6 column 19: Document root element "web-app", must match DOCTYPE root "
org.xml.sax.SAXParseException: Document root element "web-app", must match DOCTYPE root "null".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.j
at org.apache.xerces.util.ErrorHandlerWrapper.error(
at org.apache.xerces.impl.XMLErrorReporter.reportError(
at org.apache.xerces.impl.XMLErrorReporter.reportError(
at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(

It seems like the opache commons-digester fail parsing web.xml. So I downloaded the last commons-digester.tar from Jakarta-Apache and put it in %CATALINA_HOME%/server/lib (replace the original one). However, I still have this error.
All my setup is pretty standard. So I feel it is very strange that I got this error and couldn't find much answer from web.
Thanks for helping in advance.
- Jo
I agree. Here's the link:
subject: tomcat 1.4 commons-digester parse web.xml error
It's not a secret anymore!