You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jason r tibbetts <ti...@verdi.iisd.sra.com> on 2006/04/12 16:23:30 UTC

[1.0.2] JDK 1.5 vs. XML: The NoSuchMethodError

Alright, I'm at my wits' end here. I'm using the DOM APIs that are part 
of JDK 1.5. I've found three DOM methods so far that compile without 
problems, but barf a NoSuchMethodError at run in unit tests (via 
standard 'maven test'). The three perps are:

org.w3c.dom.Node.getTextContent()
org.w3c.dom.Text.getWholeText()
javax.xml.parsers.DocumentBuilderFactor.setFeature(String, boolean)

I can work around the first two by calling Node.getNodeValue(), but I 
can't figure out another way to do the setFeature() call.

I've run maven -X to view the classpaths, and AFAIK, Maven will use the 
same classpath for both the 'java' and the 'test' goals. Even if it 
doesn't, these three calls are part of the JDK, so they should be 
present regardless. Any ideas why these will compile but not run?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [1.0.2] JDK 1.5 vs. XML: The NoSuchMethodError

Posted by Arnaud HERITIER <ah...@gmail.com>.
Maven 1.0.2 and its bundled plugins doesn't support easily the jdk 1.5
Can't you test if you have the same problem with maven 1.1 beta 2 [1] or a
snapshot of the 1.1 beta 3 [2] ?

arnaud

1 : http://maven.apache.org/maven-1.x/start/download.html
2 : http://people.apache.org/~aheritier/maven/1.X/snapshots/

On 4/12/06, jason r tibbetts <ti...@verdi.iisd.sra.com> wrote:
>
> Alright, I'm at my wits' end here. I'm using the DOM APIs that are part
> of JDK 1.5. I've found three DOM methods so far that compile without
> problems, but barf a NoSuchMethodError at run in unit tests (via
> standard 'maven test'). The three perps are:
>
> org.w3c.dom.Node.getTextContent()
> org.w3c.dom.Text.getWholeText()
> javax.xml.parsers.DocumentBuilderFactor.setFeature(String, boolean)
>
> I can work around the first two by calling Node.getNodeValue(), but I
> can't figure out another way to do the setFeature() call.
>
> I've run maven -X to view the classpaths, and AFAIK, Maven will use the
> same classpath for both the 'java' and the 'test' goals. Even if it
> doesn't, these three calls are part of the JDK, so they should be
> present regardless. Any ideas why these will compile but not run?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>