You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Christopher Blunck <bl...@gst.com> on 2001/03/07 00:12:17 UTC
XalanJ 2.0.0 and Ant
All-
I'm (trying) to use Xalan to transform some XML into Java enumerated
classes. I'm using Ant as my build tool. In my build.xml I specify a
style with processor="xalan". However, I get this stack track:
node is: org.apache.xalan.stree.ElementImpl
java.lang.NoSuchMethodError
at org.apache.xpath.DOM2Helper.getLocalNameOfNode(DOM2Helper.java:327)
at org.apache.xalan.templates.TemplateList.getHead(TemplateList.java:470)
at
org.apache.xalan.templates.TemplateList.getTemplate(TemplateList.java:528)
at
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:432)
at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2029)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1189)
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
at java.lang.Thread.run(Thread.java:484)
I traced through the stack trace to insert the "node is: " in order to
figure out what class the Node is. The line referenced (DOM2Helper:327) is:
String name = n.getLocalName();
I checked the source of ElementImpl and sure 'nuf there is a public
String getLocalName() { ... }
That's where I put the "node is: ..." message.
Can anyone give me a clue about what's going on? I've been tracing
through this stuff for a couple of days now and can't figure out the
problem. My environment is JDK1.3, Ant 1.2, and XalanJ 2.0.0. I'm
using the Xerces parser that came inside of XalanJ 2.0.0. I had to
modify Ant's build.xml to include the XalanLiason, but that was *all*
that I had to modify in Ant.
Thanks for anyone that can help.
-Chris
Re: XalanJ 2.0.0 and Ant
Posted by Gary L Peskin <ga...@firstech.com>.
Christopher Blunck wrote:
>
> All-
>
> I'm (trying) to use Xalan to transform some XML into Java enumerated
> classes. I'm using Ant as my build tool. In my build.xml I specify a
> style with processor="xalan". However, I get this stack track:
>
> node is: org.apache.xalan.stree.ElementImpl
> java.lang.NoSuchMethodError
> at org.apache.xpath.DOM2Helper.getLocalNameOfNode(DOM2Helper.java:327)
Chris --
You have another DOM parser in your CLASSPATH ahead of Xerces that does
not implement getLocalName(). Java found your class instead of the one
that comes with Xerces of the same name. Check you CLASSPATH for
another parser. If you don't see it there, try your lib/ext directory
if you're running under Java2.
Gary