|
From: Leif M. <lei...@ta...> - 2003-10-17 12:03:02
|
I have always used Jetty embedded within other applications. Recently, I have been attempting to upgrade to the latest CVS code and have been running into problems when attempting to run on an off line computer. The WebApplicationContext class now defines a defaultsDescriptor, org/mortbay/jetty/servlet/webdefault.xml which contains references to online files: <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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> When I run my application on line, the application starts up very slowly but it will start. When I run off line however, I get a large number of errors caused by the inability to locate http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd I assume that is what is slowing down the startup while connected as well. WARNING@jar:file:/<path>/lib/jetty-20031015.jar!/org/mortbay/jetty/servlet/webdefault.xml line:26 col:18 : org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. I have been able to work around this by overriding the webdefault.xml with a file that does not specify the schema location etc. But that is not ideal. I notice that when I run Jetty using the normal startup method, by just running "java -jar start.jar", Jetty not only start up quickly but has no problems with being off line. I have spent quite a bit of time trying to figure out what the start/Main class is doing to disable the validation(?) that is leading to my problems but have thus far not been able to figure it out. Any advice would be greatly appreciated. I noticed the org.mortbay.xml.XmlParser.NotValidating property, but setting that to true does not seem to have any effect. Thank you in advance, Leif |