The XML parser in Tomcat 4.0.3 requires STRICT adherence
to XML standards.  I struggled for a while myself before
I discovered that XML sub-elements must appear in the SAME ORDER
as they are listed in the DTD. That was news to me, because I
had never seen a parser that required it.

So...  make sure your XML is absolutely correct.  Your parse error
is coming at line 1 column 1 so make sure your web.xml starts with
<?xml version="1.0" encoding="ISO-8859-1"?> and then make sure
your <!DOCTYPE> tag is is exactly right. One wrong letter will
screw it up. Note that server.xml does not need the opening <?xml> 
or <!DOCTYPE> tags, but web.xml does.


----- Original Message ----- 
From: "Daryn Nakhuda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 28, 2002 4:07 AM
Subject: SAXParseException on catalina.sh run


> 
> I'm getting the following error when I run 'catalina.sh run'. It'll happen 
> whether I say /path/to/catalina.sh or ./ or just catalina.sh. another user 
> with nearly identical server.xml and web.xml doesn't get the error (the 
> only differences between our files are port numbers and user names)
> 
> Any ideas?  I'm pretty sure the errors are referring to web.xml, and I can 
> make it have other errors, but can't get rid of this one, even though 
> someone else w/ the same file won't have a problem..
> 
> something in my env??!
>  
> 
> --error--
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.3
> PARSE error at line 1 column 1
> org.xml.sax.SAXParseException: The markup in the document preceding the 
> root element must be well-formed.
> PARSE error at line 1 column 1
> org.xml.sax.SAXParseException: The markup in the document preceding the 
> root element must be well-formed.
> PARSE error at line 1 column 1
> org.xml.sax.SAXParseException: The markup in the document preceding the 
> root element must be well-formed.
> 
> 
> Server.xml (first few lines)
> --------
> <!-- Example Server Configuration File -->
> <!-- Note that component elements are nested corresponding to their
>      parent-child relationships with each other -->
> 
> web.xml (first few lines)
> --------
> 
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>     "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>
> 
> <web-app>
>   <servlet>
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to