[JWebUnit-users] Getting NoSuchMethodException when using jWebUnit
Brought to you by:
henryju
From: Senthil <sen...@gm...> - 2013-05-22 10:21:26
|
I keep getting the following exception when I execute the following jWebUnit code WebTester tester = new WebTester(); tester.setBaseUrl(baseURL); tester.beginAt("main.faces"); //Exception is thrown here This is very similar to the exception that I found in the htmlunit mailing list - http://old.nabble.com/Re%3A--HtmlUnit--htmlunit-Build-Failed-p35290099.html Any suggestions or workarounds are welcome. The following is the stack trace that I got java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext() at com.gargoylesoftware.htmlunit.HtmlUnitSSLSocketFactory.createSSLContext(HtmlUnitSSLSocketFactory.java:119) at com.gargoylesoftware.htmlunit.HtmlUnitSSLSocketFactory.<init>(HtmlUnitSSLSocketFactory.java:102) at com.gargoylesoftware.htmlunit.HtmlUnitSSLSocketFactory.buildSSLSocketFactory(HtmlUnitSSLSocketFactory.java:77) at com.gargoylesoftware.htmlunit.HttpWebConnection.configureHttpsScheme(HttpWebConnection.java:590) at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java:538) at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java:501) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:154) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1484) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1402) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:304) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:373) at net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.gotoPage(HtmlUnitTestingEngineImpl.java:253) at net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl.beginAt(HtmlUnitTestingEngineImpl.java:212) at net.sourceforge.jwebunit.junit.WebTester.beginAt(WebTester.java:234) Caused by: java.lang.NoSuchMethodException: org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext() at java.lang.Class.getDeclaredMethod(Class.java:1956) at com.gargoylesoftware.htmlunit.HtmlUnitSSLSocketFactory.createSSLContext(HtmlUnitSSLSocketFactory.java:113) ... 53 more Thanks in advance Senthil. |