[jdom-interest] Problem parsing a XML file

Jason Hunter jhunter at collab.net
Mon Feb 26 15:01:09 PST 2001


Marko Lahma wrote:
> 
> I have been having problems with parsing this XML file:
> http://www.finnkino.fi/xml/tampere.asp .
> 
> Then I try to load this from and parse it with JDOM-b6. I've tried both
> loading with FileReader and StringReader which reads from contructed
> String. Still I get the same error:
> 
> java -classpath ".;xerces.jar;jdom.jar" irssibot.modules.Movies
> org.jdom.JDOMException: Error in building: null
>          at org.jdom.input.SAXBuilder.build(SAXBuilder.java:411)
>          at org.jdom.input.SAXBuilder.build(SAXBuilder.java:499)
>          at irssibot.modules.Movies._$2264(Movies.java:152)
>          at irssibot.modules.Movies.main(Movies.java:310)
> Root cause: java.lang.NullPointerException
>          at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:878)
>          at org.jdom.input.SAXBuilder.build(SAXBuilder.java:395)
>          at org.jdom.input.SAXBuilder.build(SAXBuilder.java:499)
>          at irssibot.modules.Movies._$2264(Movies.java:152)
>          at irssibot.modules.Movies.main(Movies.java:310)
>          .......
> 
> Any ideas?

I see the same error when using Xerces 1.2, the one bundled with
jdom-b6.  When I try Crimson as the parser, it works just fine.  Looks
like a Xerces bug.  You might want to experiment with a newer Xerces
(let us know if you find any issues) or switch to Crimson for the time
being.

-jh-



More information about the jdom-interest mailing list