From: laredotornado on
Hi,

I'm trying to write some JUnit (3.8.1) tests using Maven (1.1, can't
upgrade now), and Java 1.5. In my Maven dependency list, I have

<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.0</version>
</dependency>

And when I run my test, it dies with ...

org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/
String;Ljava/lang/Class;)I
java.lang.NoSuchMethodError:
org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/
String;Ljava/lang/Class;)
at
com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.initFunctionTable
(XPathAdapter.java:52)
at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.<init>
(XPathAdapter.java:68)
at
com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath
(XPathUtils.java:128)
at
com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath
(XPathUtils.java:72)
at
com.gargoylesoftware.htmlunit.javascript.host.HTMLCollection.computeElements
(HTMLCollection.java:245)
at
com.gargoylesoftware.htmlunit.javascript.host.HTMLCollection.getElements
(HTMLCollection.java:232)
at
com.gargoylesoftware.htmlunit.javascript.host.HTMLCollection.getWithPreemption
(HTMLCollection.java:323)


Somehow an older version of the xalan method is getting called (from
an earlier version than 2.7) but I can't figure out where in my system
it is getting loaded. I have done a search in my system for all xalan
jar files and I can't find any in my classpath. What advice do you
have for troubleshooting this problem and finding out how the old
classes are getting loaded?

Thanks, - Dave
From: Sherkan on
it looks like you don't have some jar library.
Check all your jars if there is such an method
From: Arne Vajhøj on
On 29-01-2010 11:16, laredotornado wrote:
> I'm trying to write some JUnit (3.8.1) tests using Maven (1.1, can't
> upgrade now), and Java 1.5. In my Maven dependency list, I have
>
> <dependency>
> <groupId>xalan</groupId>
> <artifactId>xalan</artifactId>
> <version>2.7.0</version>
> </dependency>
>
> And when I run my test, it dies with ...
>
> org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/
> String;Ljava/lang/Class;)I
> java.lang.NoSuchMethodError:
> org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/
> String;Ljava/lang/Class;)

> Somehow an older version of the xalan method is getting called (from
> an earlier version than 2.7) but I can't figure out where in my system
> it is getting loaded. I have done a search in my system for all xalan
> jar files and I can't find any in my classpath. What advice do you
> have for troubleshooting this problem and finding out how the old
> classes are getting loaded?

System.out.println(org.apache.xpath.compiler.FunctionTable.class.getProtectionDomain().getCodeSource());

somewhere in the code.

Arne