- From: Sean Owen <srowen@google.com>
- Date: Tue, 22 Jan 2008 21:49:45 -0500
- To: "Dominique Hazael-Massieux" <dom@w3.org>
- Cc: public-mobileok-checker <public-mobileok-checker@w3.org>
I am for the moment quite stumped here. Java 6 uses JAXP 1.4, which means Xerces 2.8 or so, compared to Java 5 / JAXP 1.3 / Xerces 2.6. Looks like the means to define an entity resolver changed quite a bit between the two and the existing method doesn't do anything in the latest version it seems. This is surprising. I also don't quite see how to set a new-style entity resolver. It seems like the mechanism is Xerces specific, setting parser property "http://apache.org/xml/properties/internal/entity-resolver" to an instance of XMLEntityResolver, but this seems to have no effect. Can you use an older version of JAXP / Xerces in 6? yes, but since JAXP is built in to the JDK libraries, it requires some fragile command line trickery to override it. One workaround is to just unpack the .jar into the working directory. Another is to use Java 5. I give up for the moment but want to revisit it later. Sean On Jan 22, 2008 2:06 PM, Sean Owen <srowen@google.com> wrote: > FYI this seems to be a Java 5 / Java 6 issue (well, probably something > to do with the version of the XML parsers included in each). Seems to > work in 5, not in 6. > > > On Jan 21, 2008 5:27 AM, Dominique Hazael-Massieux <dom@w3.org> wrote: > > > > Le dimanche 20 janvier 2008 à 14:54 -0500, Sean Owen a écrit : > > > Yes, more changes were need to make sure DTDs resolve not from the > > > local filesystem, but from the classpath, where appropriate. It appear > > > to work correctly for me now. > > > > It doesn't for me... Both from a local build and from the checked-in > > deploy.jar, I get a FileNotFound exception when I run the jar from > > elsewhere than the build directory: > > java -jar mobileok-ref/mobileOK-Basic-RI-1.0-deploy.jar -m wml.moki -r wml.results http://www.w3.org/2005/MWI/Tests/ > > Info: Writing MOKI document to wml.moki > > Info: Writing result document to wml.results > > Exception in thread "main" org.w3c.mwi.mobileok.basic.TestException: java.io.FileNotFoundException: /home/dom/dev.w3.org/2007/dtd/www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd (No such file or directory) > > at org.w3c.mwi.mobileok.basic.HTTPXHTMLResource.validateMarkup(HTTPXHTMLResource.java:559) > > at org.w3c.mwi.mobileok.basic.HTTPXHTMLResource.<init>(HTTPXHTMLResource.java:98) > > at org.w3c.mwi.mobileok.basic.Preprocessor.preprocess(Preprocessor.java:30) > > at org.w3c.mwi.mobileok.basic.Tester.getPreprocessorResults(Tester.java:79) > > at org.w3c.mwi.mobileok.basic.Tester.main(Tester.java:191) > > Caused by: java.io.FileNotFoundException: /home/dom/dev.w3.org/2007/dtd/www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd (No such file or directory) > > at java.io.FileInputStream.open(Native Method) > > at java.io.FileInputStream.<init>(FileInputStream.java:106) > > at java.io.FileInputStream.<init>(FileInputStream.java:66) > > at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) > > at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) > > at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653) > > at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1316) > > at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1283) > > at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283) > > at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1168) > > at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1068) > > at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:988) > > at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645) > > at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) > > at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508) > > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) > > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) > > at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) > > at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) > > at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) > > at org.w3c.mwi.mobileok.basic.HTTPXHTMLResource.validateMarkup(HTTPXHTMLResource.java:548) > > ... 4 more > > > > HTH, > > > > Dom > > > > >
Received on Wednesday, 23 January 2008 02:50:03 UTC