Return-Path: Mailing-List: contact general-help@xml.apache.org; run by ezmlm Delivered-To: mailing list general@xml.apache.org Received: (qmail 94440 invoked from network); 16 Feb 2001 18:07:56 -0000 Received: from interop.leopard.com (HELO must.interoperate.com) (209.38.73.63) by h31.sny.collab.net with SMTP; 16 Feb 2001 18:07:56 -0000 Received: from what.leopard.com (IDENT:inter0p@what.leopard.com [209.38.73.61]) by must.interoperate.com (8.9.3/8.9.3) with SMTP id GAA03647 for ; Fri, 16 Feb 2001 06:14:10 -0700 From: aazz Reply-To: aaz@leopard.com To: "'general@xml.apache.org'" Subject: RE: xerces 1.1.1 -> 1.3.0 probs Date: Fri, 16 Feb 2001 12:08:07 -0700 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain References: <379250A13595D31190660090278AC63C013D90C6@corpismsg02> MIME-Version: 1.0 Message-Id: <01021612092502.03449@what.leopard.com> Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Thanks Pradeep, That appears to fix it. Anyone know when this bug will be fixed? Also will this fixer code backwards compatible with the xerces versions that don't have this bug? thanks On Fri, 16 Feb 2001, Rathi, Pradeep wrote: > >%_Have you tried this. > > Pradeep > > -----Original Message----- > From: Michael Bayer > To: xerces-j-user@xml.apache.org > Sent: 02/12/2001 2:27 PM > Subject: NullPointerException in org.apache.xerces.utils.StringPool > (example included!) > > > > This bug applies to versions 1.2.* and 1.3.* of Xerces. It does not > exist > in 1.0.* . > > It seems the XMLDTDScanner is relying upon the SystemId property of > org.xml.sax.InputSource when an XML document contains external unparsed > entities (example XML is below). If the SystemId is not set, you get a > NullPointerException at > org.apache.xerces.utils.StringPool.addSymbol(StringPool.java:348). > > Constructing an InputSource from a Reader or InputStream will create > this > behavior, i.e. getSystemId() returns null. The method > setSystemId(String) > can be called to manually set the systemid as a workaround. > > This requirement should be either fixed, or properly handled with a > message (and documented). > > Example XML: > > > > > ]> > > > hello world > > > > > Example program: > > import org.xml.sax.*; > import org.xml.sax.helpers.*; > import java.io.*; > > public class TestXerces { > public static void main(String [] argv) { > String uri = argv[0]; > > try { > XMLReader reader = > XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser"); > > InputSource i = new InputSource(new > FileReader(uri)); > > // uncomment this line to make it work > //i.setSystemId(uri); > > reader.parse(i); > > } > catch (SAXException se) { > if (se.getException() != > null) se.getException().printStackTrace(); > se.printStackTrace(); > } > catch (Exception e) { > e.printStackTrace(); > } > > } > } > > usage: > > java TestXerces > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org > For additional commands, e-mail: xerces-j-user-help@xml.apache.org > > > -----Original Message----- > > From: aazz [mailto:aaz@leopard.com] > > Sent: Friday, February 16, 2001 10:52 AM > > To: general@xml.apache.org > > Subject: xerces 1.1.1 -> 1.3.0 probs > > > > > > Hi, > > We have an app that has been running fine on Xerces 1.1.1 and we just > > replaed our jar with Xerces 1.3.0. Everything compiles fine, but now > > when we parse any of our XML files like the sample below, the > > parser throws a > > null pointer exception. It appears to be around our use of > > ENTITY references. > > Note the file noted in the SYSTEM ref does exist and the XML > > in it is fine and > > can be parsed on its own a-ok. Any Ideas? This works in 1.1.1 > > > > > > > > > > > > > ]> > > > > > > > > &test_xml; > > &test2_xml; > > > > > > --------------------------------------------------------------------- > > In case of troubles, e-mail: webmaster@xml.apache.org > > To unsubscribe, e-mail: general-unsubscribe@xml.apache.org > > For additional commands, e-mail: general-help@xml.apache.org > > > ---------------------------------------- Content-Type: text/html; name="unnamed" Content-Transfer-Encoding: quoted-printable Content-Description: ----------------------------------------