You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Chris Halverson <ch...@ncube.com> on 2000/06/13 16:32:51 UTC

importNode in DocumentImpl

Comments in source seem to indicate that importNode doesn't work but the
code seems complete.
I am however having this problem, and I'm passing in an element and true.


> Operation log:
>  
> 20000612 17:16:54:796 MISC   Debug Q stats size: 0 max: 0 avg: 0
> java.lang.NoSuchMethodError: org.w3c.dom.Node: method
> getLocalName()Ljava/lang/String; not found
>         at
> org.apache.xerces.dom.DocumentImpl.importNode(DocumentImpl.java, Compiled
> Code)
> 
> 
Christopher R. Halverson
nCube
chalvers@ncube.com
"Never underestimate the ability of any human to delude themselves,"
"and convince others their delusion is absolute"



Re: importNode in DocumentImpl - probably Java error

Posted by Daniel Barclay <Da...@digitalfocus.com>.


> Comments in source seem to indicate that importNode doesn't work but the
> code seems complete.
> I am however having this problem, and I'm passing in an element and true.
> 
> > Operation log:
> >
> > 20000612 17:16:54:796 MISC   Debug Q stats size: 0 max: 0 avg: 0
> > java.lang.NoSuchMethodError: org.w3c.dom.Node: method
> > getLocalName()Ljava/lang/String; not found
> >         at
> > org.apache.xerces.dom.DocumentImpl.importNode(DocumentImpl.java, Compiled
> > Code)

Make sure you can recognize Java configuration errors.

The error message:

java.lang.NoSuchMethodError: org.w3c.dom.Node: method getLocalName()Ljava/lang/String; not found

usually indicates that you are executing with a different version 
of a class than that with which you compiled

(Specifically, org.apache.xerces.dom.DocumentImpl.importNode(...)
was compiled against a version of org.w3c.dom.Node that had method 
getLocalName(java.lang.String), but it's currently running with a 
version of org.w3c.dom.Node that does not define that method.)

Check your class path and your Jar files.  You're probably running
with a DOM Level 1 version of the the DOM classes instead of a DOM
Level 2 version (like maybe from older vs. newer release of Xerces).

(Namespace support was added between Level 1 and Level 2.)


Daniel
-- 
Daniel Barclay
Digital Focus
Daniel.Barclay@digitalfocus.com