From: Romain T. <rth...@sf...> - 2005-08-19 08:50:02
|
That's what i thought, but i didn't see any conflict the first time i=20 searched. Maybe i was tired, because i searched a second time after your=20 reply, i found it quickly... Sorry for such a stupid mistake, and thanks for your help. Romain Marc Guillemot a =E9crit : > Looks like you've got the wrong httpclient lib on your classpath. Are=20 > your sure to have only the jars of htmlunit's lib dir and no other=20 > version of httpclient on your classpath? > > Marc. > > Romain Thouvenin wrote: > >> I wrote a very simple test to use HtmlUnit, but it fails at the first=20 >> line. I don't understand what can be my error. >> >> Here is the code of the test : >> public class TestNavig{ >> public static void main(String[] args) { >> WebClient browser =3D new WebClient(); >> HtmlPage identPage =3D (HtmlPage) browser.getPage(new=20 >> URL("http://localhost:8080/")); >> } >> } >> >> And the StackTrace of the thrown exception : >> java.lang.NoSuchMethodError:=20 >> org.apache.commons.httpclient.HttpClient.getParams()Lorg/apache/common= s/httpclient/params/HttpClientParams;=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClientFor(HttpW= ebConnection.java:301)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebCon= nection.java:131)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java= :1588)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java= :1562)=20 >> >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359) >> at=20 >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) >> at com.sfwan.tester.tests.TestNavig.main(TestNavig.java:31) >> >> I'm using HtmlUnit-1.6 and all the jars provided in the lib directory=20 >> of the zip I've downloaded are in my classpath. >> Does anybody understand wich mistake i've made ? >> >> Thanks, >> Romain >> >> >> >> ------------------------------------------------------- >> SF.Net email is Sponsored by the Better Software Conference & EXPO >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 >> Practices >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing=20 >> & QA >> Security * Process Improvement & Measurement *=20 >> http://www.sqe.com/bsce5sf >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing=20 > & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5= sf > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |