[jdom-interest] java.lang.NoSuchMethodError: org.xml.sax.Attributes: method getQName(I)Ljava/lang/String; not found

Chris Todd chris.todd at home.com
Sat Feb 10 18:45:18 PST 2001


I am trying to work with the Ant "Anakia" task that comes with Velocity, by
Jon Stevens, but I am getting an error that I think might be a JDOM/xerces
problem.  I have pasted the stack trace below.  The only jars in my
classpath were the ant-1.2.jar, jdom.jar, and xerces.jar that came with the
JDOM-b5 distribution, and velocity-0.71.jar.

I am not a Java or XML expert, but there are two things that puzzle me about
the stack trace below.  First, org.xml.sax.Attributes that comes with xerces
does, in fact, have a method getQName that takes an int and returns a
String.  Second, org.xml.sax.Attributes is an interface, so it shouldn't
have an implementation, but org.jdom.input.SAXHandler clearly calls
atts.getQName(i) on line 607 of SAXBuilder.java.  I'm confused.

Anyone who might be able to help me get Anakia working would receive my
gratitude.

Sincerest regards,
Chris Todd
chris.todd at home.com

Here's the stack trace I get when I run the Anakia Ant task:

java.lang.NoSuchMethodError: org.xml.sax.Attributes: method
getQName(I)Ljava/lang/String; not found
	at org.jdom.input.SAXHandler.startElement(SAXBuilder.java:607)
	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(XMLDocumentScanne
r.java:1831)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.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:302)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:373)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
	at
org.apache.velocity.anakia.AnakiaTask.process(AnakiaTask.java:291)
	at
org.apache.velocity.anakia.AnakiaTask.execute(AnakiaTask.java:260)
	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:122)
	at org.apache.tools.ant.Target.execute(Target.java:142)
	at org.apache.tools.ant.Project.runTarget(Project.java:818)
	at org.apache.tools.ant.Project.executeTarget(Project.java:532)
	at org.apache.tools.ant.Project.executeTargets(Project.java:506)
	at org.apache.tools.ant.Main.runBuild(Main.java:420)
	at org.apache.tools.ant.Main.main(Main.java:149)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2652 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010210/81dbc441/winmail.bin


More information about the jdom-interest mailing list