Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Problem with Xerces/XOMHandler.inInternalSubset reading from File but not FileReader or FileInputStream

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT ibiblio.org>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Problem with Xerces/XOMHandler.inInternalSubset reading from File but not FileReader or FileInputStream
  • Date: Tue, 15 Sep 2009 07:56:39 -0400

I know what's happening. It is a XOM bug, not a Xerces bug.

On Mon, Sep 14, 2009 at 2:37 PM, Peter Murray-Rust <pm286 AT cam.ac.uk> wrote:
> We have the following code which produces runtime errors on some machines
> but not others. We are using xom-1.2.3 and Java 1.6.0_13-b03
>
> File b511922g.xml contains:

This is the clue:

> Caused by: java.lang.NullPointerException
>        at nu.xom.XOMHandler.inInternalSubset(Unknown Source)
>        at nu.xom.XOMHandler.attributeDecl(Unknown Source)

The only line in inInternalSubset that could conceivably throw
NullPointerException is the 3rd one:

String currentURI = locator.getSystemId();
if (currentURI == this.documentBaseURI) return true;
if (currentURI.equals(this.documentBaseURI)) return true;

If currentURI is null, but documentBaseURI is not null, then this
will throw a NullPointerException.

I'll make a fix shortly as soon as I can figure out how to test this.

--
Elliotte Rusty Harold
elharo AT ibiblio.org




Archive powered by MHonArc 2.6.24.

Top of Page