Help resolving NoSuchMethodError

L

laredotornado

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
 
S

Sherkan

it looks like you don't have some jar library.
Check all your jars if there is such an method
 
A

Arne Vajhøj

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,743
Latest member
WoodrowMea

Latest Threads

Top