You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Brad OHearne <Br...@careerpath.com> on 2000/08/19 02:16:29 UTC

RE: SAX2 DTD reference --- IDE problem

Hey all,

I know you have been getting my emails about exceptions getting thrown
because the DTD referenced in my XML file is not found.  It appears there is
a possibility we have uncovered a bug in my IDE, which is Visual Age for
Java2.  We took the same application, and ran it from both JBuilder and the
command line, and it worked, but it still throws exceptions in VA. Has
anyone else experienced similar problems?

Brad

-----Original Message-----
From: Brad OHearne 
Sent: Friday, August 18, 2000 1:15 PM
To: 'xerces-j-dev@xml.apache.org'
Subject: RE: SAX2 can't find the DTD referenced in my XML file - ALL THE
INFO


I have tried three forms:

1) This throws an exception.

<!DOCTYPE DataFeed SYSTEM "DataFeed.dtd">

2) This also throws an exception.

<!DOCTYPE DataFeed SYSTEM "file:///DataFeed.dtd">

3) This works.

<!DOCTYPE DataFeed SYSTEM "file:///c:\data\dev\test\inproc\DataFeed.dtd">


-----Original Message-----
From: Lawrence Fry [mailto:lwfry@bbnow.net]
Sent: Friday, August 18, 2000 1:11 PM
To: xerces-j-dev@xml.apache.org
Subject: RE: SAX2 can't find the DTD referenced in my XML file - ALL THE
INFO


1. lets see your doc type reference in your xml file...
2. does the file in the dump exist at the location noted?


-----Original Message-----
From: Brad OHearne [mailto:Brad.OHearne@careerpath.com]
Sent: Friday, August 18, 2000 12:44 PM
To: 'xerces-j-dev@xml.apache.org'
Subject: SAX2 can't find the DTD referenced in my XML file - ALL THE
INFO


Ok, this mail constitutes full disclosure.  I have tried this every which
way, and now am using the exact code from SAX2Count.java to create my
parser, to no avail.  My SAX2 parser finds the XML file, but cannot find the
DTD referenced inside the xml file.  I have tried this every which way, but
the same exception is thrown.

Here is the parser creation code:

XMLReader parser = (XMLReader)Class.forName(parserName).newInstance();
parser.setContentHandler(new FeedHandler(new MapperV2(p)));
String uri = "file:" +
"c:\\data\\dev\\test\\inproc\\ct.20000802.1346.722544.txt";
parser.parse(uri);

NOTES ABOVE: the URI is found, and the file starts to parse.  Here is the
exception thrown:

org.xml.sax.SAXParseException: File "c:/data/dev/test/inproc/DataFeed.dtd"
not found.
	java.lang.Throwable(java.lang.String)
	java.lang.Exception(java.lang.String)
	org.xml.sax.SAXException(java.lang.String)
	org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator)
	void
org.apache.xerces.framework.XMLParser.reportError(org.xml.sax.Locator,
java.lang.String, int, int, java.lang.Object [], int)
	boolean
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntit
y(boolean)
	void
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubse
t(java.lang.String, java.lang.String, int)
	boolean org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl()
	void
org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(boolean)
	void
org.apache.xerces.framework.XMLDocumentScanner.access$0(org.apache.xerces.fr
amework.XMLDocumentScanner, boolean)
	boolean
org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(boo
lean)
	boolean
org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean)
	void
org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource)
	void org.apache.xerces.framework.XMLParser.parse(java.lang.String)

(I cut the last part of the stack off here, as it bears no relevance to the
issue). NOTES ABOVE: I have tried BOTH forward and backward slashes (at the
urging of other technical people here), and a relative path as well.  No
luck.  I get the same problem consistently regardless.

FYI - I am using Visual Age, and Java 1.2.

Someone help!  Thanks!

Brad

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org