[jdom-interest] JDOM SaxBuilder Error

Jason Hunter jhunter at collab.net
Wed May 30 09:08:16 PDT 2001

As it recommends in the FAQ, when sending a bug report please tell which
JDOM version you're using, and if it's not the latest in CVS please try
what's in CVS first.  Lots of bugs are fixed between betas, and there's
no point in investigating what's already fixed.  :-)


David.Blatchford at usa.alcatel.com wrote:
> I am relatively new to JDOM, and have run into a problem using the
> SAXBuilder class. I have an XML file (base.xml) which references an
> external entity, that is another XML file (ext.xml) . In my java class I am
> trying to build a Document using the SAXBuilder class. I am passing in a
> FileInputStream(the base.xml file) to the build() method of the SAXBuilder
> class and then try to do some accessing of elements afterwards. However,
> when I try to run the program I get the following:
> org.jdom.JDOMException: Error in building: null
>      at org.jdom.input.SAXBuilder.build(SAXBuilder.java:411)
>      at org.jdom.input.SAXBuilder.build(SAXBuilder.java:428)
>      at myfile.init(myfile.java:55)
>      at myfile.main(myfile.java:653)
> Root cause: java.lang.NullPointerException
>      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
>      at org.jdom.input.SAXBuilder.build(SAXBuilder.java:395)
>      at org.jdom.input.SAXBuilder.build(SAXBuilder.java:428)
>      at myfile.init(myfile.java:55)
> JDOMException caught: org.jdom.JDOMException: Error in building: null
>      at myfile.main(myfile.java:653)
> Exception in thread "main"
> I have validated the base.xml file using XMLSpy, and get no errors. The DTD
> in base.xml contains definitions for everything that is found in ext.xml.
> So why is SAXBuilder, or the Xerces parser, having problems parsing my
> file? Any help would be great.
> Thanks,
> Dave
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list