On Tue, 19 Mar 2002, John Wadkin wrote:

> Date: Tue, 19 Mar 2002 17:22:47 -0000
> From: John Wadkin <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "Tomcat Users List (E-mail)" <[EMAIL PROTECTED]>
> Subject: XML curiosities
>
> All,
>
> A few XML issues. Firstly, I wrongly put this in server.xml:
>
> <Valve classname="org.apache.catalina.valves.RemoteAddrValve"
>  allow="<ip address>, <ip address>" />
>
> Instead of seeing a SAX parse exception or similar, this appeared in
> catalina.out:
>

I agree that the error message below is less than helpful, but why did you
expect an XML parsing error?  It looks like you have valid XML syntax.
What was wrong that you finally found and fixed?

Craig


> ERROR reading /usr/local/tomcat/conf/server.xml
> At Line 29 /Server/Service/Engine/Host/Context/Valve/
> classname=org.apache.catalina.valves.RemoteAddrValve allow=161.112.*,
> 194.164.*
>
> Catalina.start: java.lang.NullPointerException
> java.lang.NullPointerException
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName0(Compiled Code)
>       at java.lang.Class.forName(Compiled Code)
>       at org.apache.catalina.util.xml.ObjectCreate.start(Compiled Code)
>       at org.apache.catalina.util.xml.XmlMapper.matchStart(Compiled Code)
>       at
> org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91)
>       at org.xml.sax.helpers.XMLReaderAdapter.startElement(Compiled Code)
>       at org.apache.xerces.parsers.SAXParser.startElement(Compiled Code)
>       at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(Compiled
> Code)
>       at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(Compiled Code)
>       at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Co
> mpiled Code)
>       at org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
> Code)
>       at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
>       at
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
>       at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
>       at javax.xml.parsers.SAXParser.parse(SAXParser.java:290)
>       at
> org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
>       at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>       at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at java.lang.reflect.Method.invoke(Compiled Code)
>       at org.apache.catalina.startup.Bootstrap.main(Compiled Code)
>
> Is this behaviour correct? It's very misleading - took me a while to work
> out what was wrong!
>
> Secondly, I changed the parser in common/lib to Xerces 2 - the two jar
> files. I expected TomCat to break, but it worked fine. However, the new
> parser reported that an XML document wasn't well-formed. I didn't think
> upgrading a parser would change the "status" of an XML document from "OK" to
> "not OK"! What gives? Is the latest version of Xerces more strict?
>
> Solaris 8
> Tomcat 4.0.1
> Apache 1.3
> mod_webapp 1
>
> Thanks,
>
> John
>
> --
> 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