I'm using Selenium 2.12, GWT 2.4 and Maven 3.0.3. When I have both
these dependencies in my <dependencies> list
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>test</scope>
</dependency>
...
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.13.0</version>
<scope>test</scope>
</dependency>
my Selenium integration tests die with the error
java.lang.NoSuchMethodError:
org.apache.http.conn.scheme.Scheme.<init>(Ljava/lang/String;ILorg/
apache/http/conn/scheme/SchemeSocketFactory;)V
at
org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:
57)
at
org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:
47)
at
org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:
209)
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:
78)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:
147)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
78)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
126)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
77)
at
com.myco.clearing.integration.AbstractIntegrationTest.setUp(AbstractIntegrationTest.java:
22)
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.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
59)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:
120)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:
145)
at org.apache.maven.surefire.Surefire.run(Surefire.java:104)
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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:
290)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
1017)
If I remove the GWT dependency, then the Selenium tests run, but long
term, this is not an option because then I can't run my GWT tests.
Any ideas how to heal the pain? - Dave
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for cme-productplus:cme-productplus-web:war:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 170,
column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.cargo:cargo-
maven2-plugin is missing. @ line 244, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
[WARNING]
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building ProductPlus Web 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ cme-
productplus-web ---
[INFO] cme-productplus:cme-productplus-web:war:1.0-SNAPSHOT
[INFO] +- com.google.gwt:gwt-servlet:jar:2.4.0:runtime
[INFO] +- com.google.gwt:gwt-user:jar:2.4.0:provided
[INFO] +- junit:junit:jar:4.8.1:test
[INFO] +- com.google.gwt:gwt-dev:jar:2.4.0:test
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:test
[INFO] +- javax.validation:validation-api:jar:sources:1.0.0.GA:test
[INFO] +- org.mockito:mockito-all:jar:1.8.5:test
[INFO] +- org.apache.commons:commons-lang3:jar:3.0.1:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] +- log4j:log4j:jar:1.2.12:compile
[INFO] +- org.apache.commons:commons-io:jar:1.3.2:compile
[INFO] +- javanettasks:httpunit:jar:1.7:test
[INFO] | +- nekohtml:nekohtml:jar:0.9.5:test
[INFO] | | \- xerces:xercesImpl:jar:2.4.0:test
[INFO] | \- jtidy:jtidy:jar:4aug2000r7-dev:test
[INFO] +- rhino:js:jar:1.6R5:test
[INFO] \- org.seleniumhq.selenium:selenium-java:jar:2.13.0:test
[INFO] +- org.seleniumhq.selenium:selenium-android-driver:jar:
2.13.0:test
[INFO] | \- org.seleniumhq.selenium:selenium-remote-driver:jar:
2.13.0:test
[INFO] | +- cglib:cglib-nodep:jar:2.1_3:test
[INFO] | \- org.json:json:jar:20080701:test
[INFO] +- org.seleniumhq.selenium:selenium-chrome-driver:jar:
2.13.0:test
[INFO] +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:
2.13.0:test
[INFO] | +- org.seleniumhq.selenium:selenium-api:jar:2.13.0:test
[INFO] | | \- com.google.guava:guava:jar:10.0.1:test
[INFO] | | \- com.google.code.findbugs:jsr305:jar:1.3.9:test
[INFO] | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:test
[INFO] | | +- xalan:xalan:jar:2.7.1:test
[INFO] | | | \- xalan:serializer:jar:2.7.1:test
[INFO] | | | \- xml-apis:xml-apis:jar:1.3.04:test
[INFO] | | +- commons-collections:commons-collections:jar:
3.2.1:test
[INFO] | | +- commons-lang:commons-lang:jar:2.6:test
[INFO] | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:test
[INFO] | | +- commons-codec:commons-codec:jar:1.4:test
[INFO] | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:
2.9:test
[INFO] | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:test
[INFO] | | +- net.sourceforge.cssparser:cssparser:jar:0.9.5:test
[INFO] | | | \- org.w3c.css:sac:jar:1.3:test
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:test
[INFO] | \- org.apache.httpcomponents:httpclient:jar:4.1.2:test
[INFO] | \- org.apache.httpcomponents:httpcore:jar:4.1.2:test
[INFO] +- org.seleniumhq.selenium:selenium-firefox-driver:jar:
2.13.0:test
[INFO] | +- commons-io:commons-io:jar:2.0.1:test
[INFO] | \- org.apache.commons:commons-exec:jar:1.1:test
[INFO] +- org.seleniumhq.selenium:selenium-ie-driver:jar:
2.13.0:test
[INFO] | \- net.java.dev.jna:jna:jar:3.3.0:test
[INFO] +- org.seleniumhq.selenium:selenium-iphone-driver:jar:
2.13.0:test
[INFO] \- org.seleniumhq.selenium:selenium-support:jar:2.13.0:test
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.360s
[INFO] Finished at: Mon Nov 28 09:34:25 CST 2011
[INFO] Final Memory: 6M/16M
[INFO]
------------------------------------------------------------------------
Any other thoughts on troubleshooting this further? - Dave
On Nov 22, 9:08 pm, Krishnan Mahadevan
<krishnan.mahadevan1...@gmail.com> wrote:
> Open your pom in eclipse, switch to dependency hierarchy,
> key in "httpclient" in the search box in the top right corner of the screen
> and check what all versions of httpclient are being pulled down by your
> dependencies and what version is being resolved by maven ?
>
> Selenium 2 requires httpclient 4.1.2 or higher to work
>
> Thanks & Regards
> Krishnan Mahadevan
>
> "All the desirable things in life are either illegal, expensive, fattening
> or in love with someone else!"
>
> On Wed, Nov 23, 2011 at 12:57 AM, laredotornado
> <laredotorn...@zipmail.com>wrote:
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Surefire Booter.java:
I have no idea when gwt releases, or how to do local builds, but a
local build of gwt should work, and the next release of gwt should
work too.
> ...
>
> read more »
Use the artefact selenium-server instead of selenium java, it will pull down all dependencies. You probably also want to update to the latest version (2.26.0 at time of posting)
From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of chandani s
Sent: 28 November 2012 10:20
To: seleniu...@googlegroups.com
Subject: [selenium-users] Re: java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Scheme.<init>
On Wednesday, 23 November 2011 00:57:44 UTC+5:30, laredotornado wrote:
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/wHHqoqXS6WIJ.
For more options, visit https://groups.google.com/groups/opt_out.