• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tomcat 1.4 commons-digester parse web.xml error

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd" version="2.4">
....
</web-app>

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 "
ull".
org.xml.sax.SAXParseException: Document root element "web-app", must match DOCTYPE root "null".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.j
va:232)
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296)
at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:155
)
......

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic