I'm trying to build some unit tests for a GWT application. I'm using GWT 2.2, SmartGWT 1.6, JUNIT 4.5 (I also tried JUNIT 3.8), Tomcat 6, and Netbeans 6.9.1.
What happens is that I'll try to run my tests and the test will crash hard with the following exception: Exception in thread "htmlUnit client thread" java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.<init>(Lorg/apache/commons/ httpclient/HttpConnectionManager;)V at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java: 394) at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java: 352) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java: 94) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java: 1397) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java: 1331) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:293) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:339) at com.google.gwt.junit.RunStyleHtmlUnit $HtmlUnitThread.run(RunStyleHtmlUnit.java:100) I realize that NoSuchMethodError is almost invariably caused by classpath or classloader issues and have been trying to dissect that but without success. I can only find one copy of htmlunit on my runtime classpath (it's in GWT-user.jar) and I'm not really sure where else to look for causes of this problem. Do I need to add GWT jars to Tomcat or something for my unit tests to work? Has anyone run into this problem before? I can't figure out how I can solve it. Any suggestions or strategies would be most appreciated. Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.