Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

oracle.xml.parser.v2.XMLParseException: Error opening external DTD

185870Jul 8 2002
I have an XML paring error that I'm trying to figure out; hope
someone can help.

I am using XDK 9.2 with Java 1.2 on Solaris. The code I'm using is
adapted from Steve Muench's example of XMLDocumentSplitter class in
his book 'Building Oracle XML Applications.' Here's the relevant
code snippet:
public void split(URL fileURL, String splitElement)
throws SAXParseException,SAXException,IOException {
this.fileURL = fileURL;
this.splitOnElement = splitElement;
// Create a new SAXParser
Parser parser = new SAXParser();
// Register the current instance of this class as the Document Handler
parser.setDocumentHandler(this);
// Create a SAX InputSource on the URL's InputStream
InputSource is = new InputSource(fileURL.openStream());
// Start parsing the stream of XML
parser.parse(is);
}

And here is the error message:
Exception in thread "main" oracle.xml.parser.v2.XMLParseException: Error opening external DTD 'r_base.dtd'.
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at org.xml.sax.SAXException.<init>(SAXException.java:45)
at org.xml.sax.SAXParseException.<init>(SAXParseException.java:116)
at oracle.xml.parser.v2.XMLParseException.<init>(XMLParseException.java:62)
at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:148)
at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:522)
at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:441)
at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:274)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:253)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:145)
at XMLDocumentSplitter.split(XMLDocumentSplitter.java:33)
at SAXLoader.main(SAXLoader.java:15)

The beginning of the XML file that is being parsed is:
<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
<!DOCTYPE r_base SYSTEM "r_base.dtd">
<r_base>
<ROW num="1">
<SITE_DATATYPE_ID>1984</SITE_DATATYPE_ID>
...

I see that some of the classes have been deprecated.
Would anyone have any suggestions for trouble shooting this?
At this point I've exhausted what to troubleshoot.
I cannot find the API documentation for a NonValidatingParser in
the javaDoc for Oracle's XDK.

Any suggestions appreciated...
--rick
--------------------------------------------------
| Rick Casey Professional Research Assistant |
| CADSWES http://cadswes.colorado.edu |
| University of Colorado at Boulder |
| caseyh@cadswes.colorado.edu work 303.735.3670 |
--------------------------------------------------
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2002
Added on Jul 8 2002
1 comment
1,322 views