Dears , I use dom4j-1.5.2 and meet the "no protocol" errors ! pls help me, thanks a lot !!!
I had two files, biz.xml and biz.dtd, and I used the following code the load the DOM content: 1) Java code ------------------------------------------------------------ SAXReader reader = new SAXReader(); //try to load xml data into Document object Document doc = null; try { doc = reader.read(filePath); }catch (DocumentException ex) { logger.info("Can not load " + filePath); logger.debug(ex.getMessage(), ex); } //return Document object return doc; --------------------------------------------------------------- 2) top lines in my biz.xml --------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE managers SYSTEM "biz.dtd"> 3) the errors and exceptions throws from oc4j on UNIX ---------------------------------------------------------------- org.dom4j.DocumentException: no protocol: org.dom4j.DocumentException: no protocol: /u01/oc4j/j2ee/home/applications/Biz/WEB-INF/biz.xml Nested except ion: no protocol: /u01/oc4j/j2ee/home/applications/Biz/WEB-INF/biz.xml at org.dom4j.io.SAXReader.read(SAXReader.java:353) at org.dom4j.io.SAXReader.read(SAXReader.java:254) ... ... .... Nested exception: java.net.MalformedURLException: no protocol: /u01/oc4j/j2ee/home/applications/Biz/WEB-INF/biz.xml at java.net.URL.<init>(URL.java:537) at java.net.URL.<init>(URL.java:434) at java.net.URL.<init>(URL.java:383) at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:205) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:148) at org.dom4j.io.SAXReader.read(SAXReader.java:334) at org.dom4j.io.SAXReader.read(SAXReader.java:254) ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user