Thank You, Ito. I think you've found the right spot on my second problem. Thank you for your time: I will set org.mortbay.xml.XmlParser.NotValidating to true, as the web application is fixed and embedded in the same big jar as jetty and all the other components.
Thank you, again On 10/19/05, Ito Kazumitsu <[EMAIL PROTECTED]> wrote: > From: Rafael Teixeira <[EMAIL PROTECTED]> > Date: Tue, 18 Oct 2005 10:45:06 -0200 > > > > > > > Also when Jetty is trying to read the configuration xmls, DTD aren't > > > > > > being correctly loaded in the sax validator: > > > > > > > > > > > > INFO: Version Jetty/5.1.x > > > > > > > > > > > > org.xml.sax.SAXParseException: Element type 'web-app' was not > > > > > > declared > > Again the same configuration files embedded in the jar run fine in > > Sun's VM and Jetty gets started and runs my web-app... > > > > The web-app not being accepted is the one in my WEB-INF/web.xml that > > uses another DTD, that indeed should accept 'web-app' > > > > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web > > Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> > > By disabling xerces, I could reproduce the same error: > "org.xml.sax.SAXParseException: Element type 'web-app' was not declared". > > > I've put some diagnostic printlns inside the > > gnu.xml.pipeline.ValidationConsumer.startElement method that is > > raising the error, and surely it looks like the DTDs isn't being > > loaded as it list of valid elements is empty at start (it adds the > > offending item to the list so that it can continue to validate without > > reissuing the same error for similar itens, so the list grows during > > the execution). > > I am afraid gnu.xml package is not mature enough as a validating > XML parser. Much work will be needed to make it stable. > > > So again looks like some other problem (I guess again with string > > manipulation) may be precluding the DTDs from being parsed/loaded and > > so the other errors appear. > > Switching the SAX parser to xerces solves the problem. So I think > the problem exists in gnu.xml package. > > Suggested workaround for now is either > > (1) Use xerces. Xerces comes with Jetty and it can be activated > by setting the system property javax.xml.parsers.SAXParserFactory > to org.apache.xerces.jaxp.SAXParserFactoryImpl > > or > > (2) Do not try to validate the configuration XML files. Jetty will not > validate the XML files if the system property > org.mortbay.xml.XmlParser.NotValidating is set to true. > -- Rafael "Monoman" Teixeira --------------------------------------- I'm trying to become a "Rosh Gadol" before my own eyes. See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. It hurts! _______________________________________________ kaffe mailing list [email protected] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
