[jdom-interest] Error with JDom?
Chad LaJoie
clajoie at vt.edu
Fri Mar 23 08:54:58 PST 2001
Every time I try to use the SAXBuilder I get the following error:
Exception in thread "main" java.lang.NoSuchMethodError:
org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found
at org.jdom.input.SAXHandler.startElement(SAXBuilder.java:727)
at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1294)
at
org.apache.xerces.framework.XMLParser.callStartElement(XMLParser.java:1922)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1831)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:991)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:395)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:464)
at JDomTest.main(JDomTest.java:14)
While the FAQ address the problem of method not found errors the fix
described there (placing your parser before any other parsers in the class
path) does not work here. The first four items in my class path are
rt.jar, tools.jar, xerces.jar, then jdom.jar
I find that if I use the DOMBuilder that this doesn't throw these
exceptions. Any clue?
At 11:29 AM 3/23/2001, you wrote:
>Guys,
>
>I just gave it a try with the following simple piece of code:
>
>-----
>import java.net.*;
>import java.io.*;
>import org.jdom.*;
>import org.jdom.input.*;
>import org.jdom.output.*;
>
>
>public class Read {
> public static void main (String args[]) throws MalformedURLException,
>IOException, JDOMException {
> XMLOutputter out = new XMLOutputter(" ", true);
> SAXBuilder builder = new SAXBuilder();
> Document doc = builder.build(new URL("http://cnn.com/cnn.rss"));
> out.output(doc, System.out);
> }
>}
>----
>
>works like a champion,
>
>probably you should take a look at your proxy stuff.
>
>Nicky
>
>_______________________________________________
>To control your jdom-interest membership:
>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
>
Chad La Joie "Only a man who can not conquer
IT Specialist his deficiencies feels the need to
IS&C - WARD convince the world he has none"
More information about the jdom-interest
mailing list