How to fix NoHttpResponseException?

87 views
Skip to first unread message

Pushpraj Singh

unread,
May 22, 2013, 8:50:16 AM5/22/13
to webd...@googlegroups.com
package tests;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;



@Test
public class Example {

public void name() {

WebDriver driver = new FirefoxDriver();

driver.get("http://www.bing.com");
driver.findElement(By.linkText("MAPS")).click();

}

}

on running this it gives error :
java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:81)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:179)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)

I google it and found that I need to add org.apache.httpcomponents.httpclient_4.2.5.jar file in my build path, but that didnt work

Please let me know , how to fix this. I have attached library screenshot , just to make sure I am not missing any important jar file.


Tarun Kumar

unread,
May 22, 2013, 11:06:45 PM5/22/13
to webd...@googlegroups.com
I did not see any issue when using you code with only selenium-server-standalone-2.32.0.jar

Pushpraj Singh

unread,
May 23, 2013, 2:53:38 AM5/23/13
to webd...@googlegroups.com
I don't know Tarun, why it is happening . Now I have updated jars from 32 to 33 (latest I see on seleniumhq.org) and it is working fine.
Thanks , its closed...

bhupesh pant

unread,
May 29, 2013, 11:37:50 AM5/29/13
to webd...@googlegroups.com
Check JRE library is properly there in your framework ?
Reply all
Reply to author
Forward
0 new messages