[jdom-interest] SAXBuilder Error

stevechampeau at mindspring.com stevechampeau at mindspring.com
Wed Jun 5 11:19:14 PDT 2002

I have been working with JDOM for a while and have just encountered my first big problem. I am
using JDOM and Xerces in some custom Ant tasks, and receive an error when I attempt to run the following code in a custom Ant task from an Ant script:
         File file = new File();
         SAXBuilder builder = new SAXBuilder();
         Document doc = builder.build(new FileInputStream(file));
This gives the error: "org.jdom.JDOMException: Error in building:

This code works fine when I run it inside JBuilder. To see if it was a classpath issue, I stuck code in the Ant task that used reflection to instantiate an instance of "org.apache.xerces.parsers.SAXParser". That code ran fine, so it must be able to find that class.

Can anyone give me an idea what's going on here? If I cannot find a fix soon I will have to abandon JDOM for my project, which I do not want to do!

Steve C.

More information about the jdom-interest mailing list