Monday, June 22, 2009

Running Canoo WebTest 3.0 on OS X

I am running Mac OS X 10.5.7

I upgraded from Canoo WebTest 2.6 to 3.0.

2.6 was running ok, but 3.0 failed with the following exception:

BUILD FAILED /Applications/CanooWebTest_3_0/webtest.xml:234: The following error occurred while executing this line: /Users/jbandi/Documents/Testcode/bookstore/webtest/tests/allTests.xml:5: The following error occurred while executing this line: /Users/jbandi/Documents/Testcode/bookstore/webtest/tests/search.xml:9: java.lang.NoSuchMethodError: org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Ljava/lang/Class;)I

After some time spent on Google, I found the following solution:

Copy the xalan-2.7.0.jar into /Library/Java/Extensions/

You can get this jar from the WebTest distribution or from here.

This worked for me, although it leaves a fishy smell... I don't like messing in the guts of the system ...

The reason is probably, that the new release of HtmlUnit now uses standard DOM tools for evaluating XPath. And the Java distribution of OS X does not ship with xalan. Or my classpath was somehow messed up ... If anybody knows the details, please enlighten me ...

1 comment:

  1. Update 2010-01-12:

    I just installed WebTest release 3.0-1758.

    To get it running I had to copy the following two jars into /Library/Java/Extensions:

    - serializer-2.7.1.jar
    - xalan-2.7.1.jar

    Both jars are in the binary ditribution of WebTest in the lib directory.


Related Posts Plugin for WordPress, Blogger...