FAQ

[webdriver] Exception with webdriver 2.28 NoClassDefFoundError org/apache/http/entity/ContentType

Sabf
Dec 12, 2012 at 11:14 am
I got an Error, when i try to start my seleniumtests:
How can i resolve that problem??

java.lang.NoClassDefFoundError: org/apache/http/entity/ContentType
at
org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:420)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:315)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:506)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at
portalservices.base.TestBase$ScreenShotRemoteWebDriver.<init>(TestBase.java:101)
at portalservices.base.TestBase.startSession(TestBase.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException:
org.apache.http.entity.ContentType
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 31 more
Caused by: java.lang.ClassNotFoundException:
org.apache.http.entity.ContentType
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 31 more
closeSession(portalservices.homepage.RegistrationTests) Time elapsed: 0
sec <<< FAILURE!
java.lang.NullPointerException
at portalservices.base.TestBase.closeSession(TestBase.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
FAILURE!
java.lang.NullPointerException
at portalservices.base.TestBase.closeSession(TestBase.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
FAILURE!
java.lang.NullPointerException
at portalservices.base.TestBase.closeSession(TestBase.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

ScreenShotRemoteWebDriver Class:

public class ScreenShotRemoteWebDriver extends RemoteWebDriver
implements TakesScreenshot {

public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
capabilities) {
super(url, capabilities); *Line 101*
}

@Override
public <X> X getScreenshotAs(OutputType<X> target) {
if ((Boolean)
getCapabilities().getCapability(CapabilityType.TAKES_SCREENSHOT)) {
String base64Str =
execute(DriverCommand.SCREENSHOT).getValue().toString();
return target.convertFromBase64Png(base64Str);
// return
target.convertFromBase64Png(execute(DriverCommand.SCREENSHOT).getValue().toString());
}
return null;
}
}

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/8t5yMb0xIYAJ.
To post to this group, send email to webdriver@googlegroups.com.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
reply

Search Discussions

9 responses

  • Darrell at Dec 14, 2012 at 5:56 am
    The class missing is the Apache HttpCore library. When I download and unzip
    the java zip file for 2.28.0, the lib/ directory
    contains httpcore-4.2.1.jar. I believe this jar file contains the missing
    class. You need to add this and all the other jar files to the classpath
    for your project to compile and run correctly.

    Darrell
    On Wednesday, 12 December 2012 03:14:03 UTC-8, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.NoClassDefFoundError: org/apache/http/entity/ContentType
    at
    org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:420)
    at
    org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:315)
    at
    org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:506)
    at
    org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at
    portalservices.base.TestBase$ScreenShotRemoteWebDriver.<init>(TestBase.java:101)
    at portalservices.base.TestBase.startSession(TestBase.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    closeSession(portalservices.homepage.RegistrationTests) Time elapsed: 0
    sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
    FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
    FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
    capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean)
    getCapabilities().getCapability(CapabilityType.TAKES_SCREENSHOT)) {
    String base64Str =
    execute(DriverCommand.SCREENSHOT).getValue().toString();
    return target.convertFromBase64Png(base64Str);
    // return
    target.convertFromBase64Png(execute(DriverCommand.SCREENSHOT).getValue().toString());
    }
    return null;
    }
    }
    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/lUsplfPUfkcJ.
    To post to this group, send email to webdriver@googlegroups.com.
    To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
  • Anthony at Dec 19, 2012 at 5:22 pm
    Had same issue fixed it by including the apache core httpcomponents in my
    pom

    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Choose 4.2.3 because it was nearest to the 2.28 release date

    http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/
    http://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-server/

    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/ZVDslbTtFa0J.
    To post to this group, send email to webdriver@googlegroups.com.
    To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
  • Malhar Trivedi at Jan 17, 2013 at 10:06 am
    I have same issue. I added apached core in my project still I see same
    error.
    Thanks in advance

    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/w3c/dom/ElementTraversal
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown
    Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at
    org.openqa.selenium.firefox.internal.FileExtension.readIdFromInstallRdf(FileExtension.java:97)
    at
    org.openqa.selenium.firefox.internal.FileExtension.writeTo(FileExtension.java:60)
    at
    org.openqa.selenium.firefox.internal.ClasspathExtension.writeTo(ClasspathExtension.java:63)
    at
    org.openqa.selenium.firefox.FirefoxProfile.installExtensions(FirefoxProfile.java:465)
    at
    org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:443)
    at
    org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
    at
    org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
    at
    org.openqa.selenium.remote.RemoteWebDriver.(FirefoxDriver.java:188)
    at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:179)
    at org.openqa.selenium.firefox.FirefoxDriver.(TestClick.java:39)
    Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal


    On Wednesday, December 19, 2012 7:01:59 AM UTC-8, ant...@zapper.hodgers.com
    wrote:
    Had same issue fixed it by including the apache core httpcomponents in my
    pom

    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Choose 4.2.3 because it was nearest to the 2.28 release date

    http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/
    http://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-server/
    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/BA4rO5vgY1sJ.
    To post to this group, send email to webdriver@googlegroups.com.
    To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
  • Mark Gibson at Jan 28, 2013 at 9:28 am
    I'm still seeing this error after updating my pom.xml with
    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Does anyone know if this error occurs with an earlier version of WebDriver?
    On Wednesday, December 12, 2012 3:14:03 AM UTC-8, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.NoClassDefFoundError: org/apache/http/entity/ContentType
    at
    org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:420)
    at
    org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:315)
    at
    org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:506)
    at
    org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at
    portalservices.base.TestBase$ScreenShotRemoteWebDriver.<init>(TestBase.java:101)
    at portalservices.base.TestBase.startSession(TestBase.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    closeSession(portalservices.homepage.RegistrationTests) Time elapsed: 0
    sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
    FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
    FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
    capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean)
    getCapabilities().getCapability(CapabilityType.TAKES_SCREENSHOT)) {
    String base64Str =
    execute(DriverCommand.SCREENSHOT).getValue().toString();
    return target.convertFromBase64Png(base64Str);
    // return
    target.convertFromBase64Png(execute(DriverCommand.SCREENSHOT).getValue().toString());
    }
    return null;
    }
    }
    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To post to this group, send email to webdriver@googlegroups.com.
    To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Krishnan Mahadevan at Feb 3, 2013 at 8:02 pm
    Mark,

    I merely had this as a dependency and I dont see this problem :

    <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>2.29.0</version>
    </dependency>


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    On Mon, Jan 28, 2013 at 8:37 AM, Mark Gibson wrote:

    I'm still seeing this error after updating my pom.xml with
    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Does anyone know if this error occurs with an earlier version of WebDriver?
    On Wednesday, December 12, 2012 3:14:03 AM UTC-8, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.**NoClassDefFoundError: org/apache/http/entity/**ContentType
    at org.openqa.selenium.remote.**HttpCommandExecutor$**
    EntityWithEncoding.<init>(**HttpCommandExecutor.java:420)
    at org.openqa.selenium.remote.**HttpCommandExecutor.execute(**
    HttpCommandExecutor.java:315)
    at org.openqa.selenium.remote.**RemoteWebDriver.execute(**
    RemoteWebDriver.java:506)
    at org.openqa.selenium.remote.**RemoteWebDriver.startSession(**
    RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.**RemoteWebDriver.<init>(**
    RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.**RemoteWebDriver.<init>(**
    RemoteWebDriver.java:129)
    at portalservices.base.TestBase$**ScreenShotRemoteWebDriver.<**
    init>(TestBase.java:101)
    at portalservices.base.TestBase.**startSession(TestBase.java:66)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    Caused by: java.lang.**ClassNotFoundException: org.apache.http.entity.**
    ContentType
    at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
    at java.security.**AccessController.doPrivileged(**Native Method)
    at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
    at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
    ... 31 more
    Caused by: java.lang.**ClassNotFoundException: org.apache.http.entity.**
    ContentType
    at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
    at java.security.**AccessController.doPrivileged(**Native Method)
    at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
    at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
    ... 31 more
    closeSession(portalservices.**homepage.RegistrationTests) Time
    elapsed: 0 sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    closeSession(portalservices.**bonus.BonusTests) Time elapsed: 0 sec
    <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    closeSession(portalservices.**bonus.BonusTests) Time elapsed: 0 sec
    <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)

    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
    capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean) getCapabilities().**
    getCapability(CapabilityType.**TAKES_SCREENSHOT)) {
    String base64Str = execute(DriverCommand.**
    SCREENSHOT).getValue().**toString();
    return target.convertFromBase64Png(**base64Str);
    // return target.convertFromBase64Png(**
    execute(DriverCommand.**SCREENSHOT).getValue().**toString());
    }
    return null;
    }
    }
    --
    You received this message because you are subscribed to the Google Groups
    "webdriver" group.
    To post to this group, send email to webdriver@googlegroups.com.
    To unsubscribe from this group, send email to
    webdriver+unsubscribe@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jakub Siberski at Feb 12, 2013 at 1:10 pm
    I have this problem wit following dependency:
    <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>2.29.0</version>
    </dependency>

    Adding httpcore as dependency fixed my problem.


    It seems, like there is something off with dependencies in selenium
    projects, but it doesn't manifest in all binaries.
    On Sunday, February 3, 2013 9:02:44 PM UTC+1, Krishnan wrote:

    Mark,

    I merely had this as a dependency and I dont see this problem :

    <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>2.29.0</version>
    </dependency>


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/


    On Mon, Jan 28, 2013 at 8:37 AM, Mark Gibson <mgib...@gmail.com<javascript:>
    wrote:
    I'm still seeing this error after updating my pom.xml with
    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Does anyone know if this error occurs with an earlier version of
    WebDriver?
    On Wednesday, December 12, 2012 3:14:03 AM UTC-8, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.**NoClassDefFoundError: org/apache/http/entity/**ContentType
    at org.openqa.selenium.remote.**HttpCommandExecutor$**
    EntityWithEncoding.<init>(**HttpCommandExecutor.java:420)
    at org.openqa.selenium.remote.**HttpCommandExecutor.execute(**
    HttpCommandExecutor.java:315)
    at org.openqa.selenium.remote.**RemoteWebDriver.execute(**
    RemoteWebDriver.java:506)
    at org.openqa.selenium.remote.**RemoteWebDriver.startSession(**
    RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.**RemoteWebDriver.<init>(**
    RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.**RemoteWebDriver.<init>(**
    RemoteWebDriver.java:129)
    at portalservices.base.TestBase$**ScreenShotRemoteWebDriver.<**
    init>(TestBase.java:101)
    at portalservices.base.TestBase.**startSession(TestBase.java:66)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**
    java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    Caused by: java.lang.**ClassNotFoundException: org.apache.http.entity.*
    *ContentType
    at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
    at java.security.**AccessController.doPrivileged(**Native Method)
    at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
    at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
    ... 31 more
    Caused by: java.lang.**ClassNotFoundException: org.apache.http.entity.*
    *ContentType
    at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
    at java.security.**AccessController.doPrivileged(**Native Method)
    at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
    at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
    ... 31 more
    closeSession(portalservices.**homepage.RegistrationTests) Time
    elapsed: 0 sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**
    java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    closeSession(portalservices.**bonus.BonusTests) Time elapsed: 0 sec
    <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**
    java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    closeSession(portalservices.**bonus.BonusTests) Time elapsed: 0 sec
    <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**
    java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)

    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
    capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean) getCapabilities().**
    getCapability(CapabilityType.**TAKES_SCREENSHOT)) {
    String base64Str = execute(DriverCommand.**
    SCREENSHOT).getValue().**toString();
    return target.convertFromBase64Png(**base64Str);
    // return target.convertFromBase64Png(**
    execute(DriverCommand.**SCREENSHOT).getValue().**toString());
    }
    return null;
    }
    }
    --
    You received this message because you are subscribed to the Google Groups
    "webdriver" group.
    To post to this group, send email to webd...@googlegroups.com<javascript:>
    .
    To unsubscribe from this group, send email to
    webdriver+...@googlegroups.com <javascript:>.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Štefan Miklošovič at Feb 14, 2013 at 11:32 am
    I am verifying as well that it works with

    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Regards
    On Wednesday, December 12, 2012 12:14:03 PM UTC+1, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.NoClassDefFoundError: org/apache/http/entity/ContentType
    at
    org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:420)
    at
    org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:315)
    at
    org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:506)
    at
    org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at
    portalservices.base.TestBase$ScreenShotRemoteWebDriver.<init>(TestBase.java:101)
    at portalservices.base.TestBase.startSession(TestBase.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    closeSession(portalservices.homepage.RegistrationTests) Time elapsed: 0
    sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
    FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0 sec <<<
    FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
    capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean)
    getCapabilities().getCapability(CapabilityType.TAKES_SCREENSHOT)) {
    String base64Str =
    execute(DriverCommand.SCREENSHOT).getValue().toString();
    return target.convertFromBase64Png(base64Str);
    // return
    target.convertFromBase64Png(execute(DriverCommand.SCREENSHOT).getValue().toString());
    }
    return null;
    }
    }
    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Mark Collin at Feb 18, 2013 at 10:53 am
    Sounds like a dependency error with selenium-java

    I would raise a bug: http://code.google.com/p/selenium/issues/list

    If you use selenium-server you won't see this issue, I personally just
    use selenium-server.
    On 12/02/2013 13:29, S(tefan Miklos(ovic( wrote:
    I am verifying as well that it works with

    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Regards

    On Wednesday, December 12, 2012 12:14:03 PM UTC+1, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.NoClassDefFoundError: org/apache/http/entity/ContentType
    at
    org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:420)
    at
    org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:315)
    at
    org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:506)
    at
    org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at
    org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at
    portalservices.base.TestBase$ScreenShotRemoteWebDriver.<init>(TestBase.java:101)
    at portalservices.base.TestBase.startSession(TestBase.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at
    org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at
    org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at
    org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at
    org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at
    org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    Caused by: java.lang.ClassNotFoundException:
    org.apache.http.entity.ContentType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 31 more
    closeSession(portalservices.homepage.RegistrationTests) Time
    elapsed: 0 sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at
    org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at
    org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at
    org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at
    org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at
    org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0
    sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at
    org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at
    org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at
    org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at
    org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at
    org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    closeSession(portalservices.bonus.BonusTests) Time elapsed: 0
    sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.closeSession(TestBase.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
    org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at
    org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at
    org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at
    org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at
    org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at
    org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at
    org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)


    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url,
    DesiredCapabilities capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean)
    getCapabilities().getCapability(CapabilityType.TAKES_SCREENSHOT)) {
    String base64Str =
    execute(DriverCommand.SCREENSHOT).getValue().toString();
    return target.convertFromBase64Png(base64Str);
    // return
    target.convertFromBase64Png(execute(DriverCommand.SCREENSHOT).getValue().toString());
    }
    return null;
    }
    }

    --
    You received this message because you are subscribed to the Google
    Groups "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jakub Siberski at Feb 18, 2013 at 12:17 pm
    even though we know workaround, you might be interested in tracking
    http://code.google.com/p/selenium/issues/detail?id=5184

    On Mon, Feb 18, 2013 at 11:53 AM, Mark Collin
    wrote:
    Sounds like a dependency error with selenium-java

    I would raise a bug: http://code.google.com/p/selenium/issues/list

    If you use selenium-server you won't see this issue, I personally just use
    selenium-server.


    On 12/02/2013 13:29, Štefan Miklošovič wrote:

    I am verifying as well that it works with

    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.2.3</version>
    </dependency>

    Regards
    On Wednesday, December 12, 2012 12:14:03 PM UTC+1, sabf wrote:

    I got an Error, when i try to start my seleniumtests:
    How can i resolve that problem??

    java.lang.**NoClassDefFoundError: org/apache/http/entity/**ContentType
    at org.openqa.selenium.remote.**HttpCommandExecutor$**
    EntityWithEncoding.<init>(**HttpCommandExecutor.java:420)
    at org.openqa.selenium.remote.**HttpCommandExecutor.execute(**
    HttpCommandExecutor.java:315)
    at org.openqa.selenium.remote.**RemoteWebDriver.execute(**
    RemoteWebDriver.java:506)
    at org.openqa.selenium.remote.**RemoteWebDriver.startSession(**
    RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.**RemoteWebDriver.<init>(**
    RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.**RemoteWebDriver.<init>(**
    RemoteWebDriver.java:129)
    at portalservices.base.TestBase$**ScreenShotRemoteWebDriver.<**
    init>(TestBase.java:101)
    at portalservices.base.TestBase.**startSession(TestBase.java:66)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    Caused by: java.lang.**ClassNotFoundException: org.apache.http.entity.**
    ContentType
    at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
    at java.security.**AccessController.doPrivileged(**Native Method)
    at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
    at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
    ... 31 more
    Caused by: java.lang.**ClassNotFoundException: org.apache.http.entity.**
    ContentType
    at java.net.URLClassLoader$1.run(**URLClassLoader.java:202)
    at java.security.**AccessController.doPrivileged(**Native Method)
    at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306)
    at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301)
    at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
    ... 31 more
    closeSession(portalservices.**homepage.RegistrationTests) Time
    elapsed: 0 sec <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    closeSession(portalservices.**bonus.BonusTests) Time elapsed: 0 sec
    <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)
    closeSession(portalservices.**bonus.BonusTests) Time elapsed: 0 sec
    <<< FAILURE!
    java.lang.NullPointerException
    at portalservices.base.TestBase.**closeSession(TestBase.java:94)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
    at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
    NativeMethodAccessorImpl.java:**39)
    at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
    DelegatingMethodAccessorImpl.**java:25)
    at java.lang.reflect.Method.**invoke(Method.java:597)
    at org.testng.internal.**MethodInvocationHelper.**invokeMethod(**
    MethodInvocationHelper.java:**80)
    at org.testng.internal.Invoker.**invokeConfigurationMethod(**
    Invoker.java:564)
    at org.testng.internal.Invoker.**invokeConfigurations(Invoker.**
    java:213)
    at org.testng.internal.Invoker.**invokeMethod(Invoker.java:786)
    at org.testng.internal.Invoker.**invokeTestMethod(Invoker.java:**901)
    at org.testng.internal.Invoker.**invokeTestMethods(Invoker.**java:1231)
    at org.testng.internal.**TestMethodWorker.**invokeTestMethods(**
    TestMethodWorker.java:127)
    at org.testng.internal.**TestMethodWorker.run(**
    TestMethodWorker.java:111)
    at org.testng.TestRunner.**privateRun(TestRunner.java:**767)
    at org.testng.TestRunner.run(**TestRunner.java:617)
    at org.testng.SuiteRunner.**runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$**000(SuiteRunner.java:37)
    at org.testng.SuiteRunner$**SuiteWorker.run(SuiteRunner.**java:368)
    at org.testng.internal.thread.**ThreadUtil$2.call(ThreadUtil.**java:64)
    at java.util.concurrent.**FutureTask$Sync.innerRun(**
    FutureTask.java:303)
    at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.**
    runTask(ThreadPoolExecutor.**java:886)
    at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
    ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.**java:662)

    ScreenShotRemoteWebDriver Class:

    public class ScreenShotRemoteWebDriver extends RemoteWebDriver
    implements TakesScreenshot {

    public ScreenShotRemoteWebDriver(URL url, DesiredCapabilities
    capabilities) {
    super(url, capabilities); *Line 101*
    }

    @Override
    public <X> X getScreenshotAs(OutputType<X> target) {
    if ((Boolean) getCapabilities().**
    getCapability(CapabilityType.**TAKES_SCREENSHOT)) {
    String base64Str = execute(DriverCommand.**
    SCREENSHOT).getValue().**toString();
    return target.convertFromBase64Png(**base64Str);
    // return target.convertFromBase64Png(**
    execute(DriverCommand.**SCREENSHOT).getValue().**toString());
    }
    return null;
    }
    }
    --
    You received this message because you are subscribed to the Google Groups
    "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.




    --
    You received this message because you are subscribed to the Google Groups
    "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    Pozdrawiam
    Jakub Siberski

    --
    You received this message because you are subscribed to the Google Groups "webdriver" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.
    To post to this group, send email to webdriver@googlegroups.com.
    Visit this group at http://groups.google.com/group/webdriver?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions