Issue 7480 in selenium: java.lang.NoSuchFieldError: INSTANCE

198 views
Skip to first unread message

sele...@googlecode.com

unread,
Jun 13, 2014, 2:31:30 PM6/13/14
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 7480 by mark.le...@gmail.com: java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

Running selenium-server-standalone-2.42.0 with Firefox 30 on Windows 7.

The following code:
WebDriver driver = new FirefoxDriver()
driver.get("http://google.com")

Produces:

Caught: java.lang.NoSuchFieldError: INSTANCE
java.lang.NoSuchFieldError: INSTANCE
at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
at
org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
at
org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
at
org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
at
org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:68)
at
org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:55)
at
org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:99)
at
org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:82)
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:93)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at com.cantor.test.Scratch.run(Scratch.groovy:12)


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Jun 13, 2014, 2:34:26 PM6/13/14
to selenium-develope...@googlegroups.com

Comment #1 on issue 7480 by mark.le...@gmail.com:
java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

Apparently there is no way to edit my original post?

My code is missing a bracket; it should say:
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");

I also tried with Selenium version 2.42.1 and 2 (latest) with same results.

sele...@googlecode.com

unread,
Jun 17, 2014, 8:30:20 AM6/17/14
to selenium-develope...@googlegroups.com
Updates:
Status: Invalid
Labels: Lang-Java

Comment #2 on issue 7480 by barancev: java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

Selenium 2.42 requires httpclient-4.3, please remove older httpclient
versions from the classpath

sele...@googlecode.com

unread,
Jun 17, 2014, 10:06:50 AM6/17/14
to selenium-develope...@googlegroups.com

Comment #3 on issue 7480 by mark.le...@gmail.com:
java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

The only version of httpclient that I have is 4.3.2

[INFO] net.sourceforge.sebase:groovy:jar:1.5
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.seleniumhq.selenium:selenium-java:jar:2.39.0:test
[INFO] | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.42.2:test
[INFO] | +-
org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.42.2:test
[INFO] | | +- net.sourceforge.htmlunit:htmlunit:jar:2.14:test
[INFO] | | | +- xalan:xalan:jar:2.7.1:test
[INFO] | | | | \- xalan:serializer:jar:2.7.1:test
[INFO] | | | +- org.apache.commons:commons-lang3:jar:3.2.1:test
[INFO] | | | +- org.apache.httpcomponents:httpmime:jar:4.3.2:test
[INFO] | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.14:test
[INFO] | | | +- xerces:xercesImpl:jar:2.11.0:test
[INFO] | | | | \- xml-apis:xml-apis:jar:1.4.01:test
[INFO] | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.20:test
[INFO] | | | +- net.sourceforge.cssparser:cssparser:jar:0.9.13:test
[INFO] | | | | \- org.w3c.css:sac:jar:1.3:test
[INFO] | | | \-
org.eclipse.jetty:jetty-websocket:jar:8.1.14.v20131031:test
[INFO] | | | +- org.eclipse.jetty:jetty-util:jar:8.1.14.v20131031:test
[INFO] | | | +- org.eclipse.jetty:jetty-io:jar:8.1.14.v20131031:test
[INFO] | | | \- org.eclipse.jetty:jetty-http:jar:8.1.14.v20131031:test
[INFO] | | \- org.apache.httpcomponents:httpclient:jar:4.3.2:test
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.3.1:test
[INFO] | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.42.2:test
[INFO] | | +- commons-io:commons-io:jar:2.4:test
[INFO] | | \- org.apache.commons:commons-exec:jar:1.1:test
[INFO] | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.42.2:test
[INFO] | | +- net.java.dev.jna:jna:jar:3.4.0:test
[INFO] | | \- net.java.dev.jna:platform:jar:3.4.0:test
[INFO] | +- org.seleniumhq.selenium:selenium-safari-driver:jar:2.42.2:test
[INFO] | +- org.seleniumhq.selenium:selenium-support:jar:2.42.2:test
[INFO] | | \- org.seleniumhq.selenium:selenium-api:jar:2.42.2:test
[INFO] | \- org.webbitserver:webbit:jar:0.4.14:test
[INFO] | \- io.netty:netty:jar:3.5.2.Final:test
[INFO] +- com.github.detro.ghostdriver:phantomjsdriver:jar:1.1.0:test
[INFO] | +- org.seleniumhq.selenium:selenium-remote-driver:jar:2.39.0:test
[INFO] | | +- cglib:cglib-nodep:jar:2.1_3:test
[INFO] | | +- org.json:json:jar:20080701:test
[INFO] | | \- com.google.guava:guava:jar:15.0:test
[INFO] | \- org.seleniumhq.selenium:selenium-server:jar:2.39.0:test
[INFO] | +- org.bouncycastle:bcprov-jdk15on:jar:1.48:test
[INFO] | +- org.bouncycastle:bcpkix-jdk15on:jar:1.48:test
[INFO] | +- mx4j:mx4j-tools:jar:3.0.1:test
[INFO] | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:test
[INFO] | +- org.seleniumhq.selenium:jetty-repacked:jar:7.6.1:test
[INFO] | +- net.jcip:jcip-annotations:jar:1.0:test
[INFO] | \- org.yaml:snakeyaml:jar:1.8:test
[INFO] +- commons-lang:commons-lang:jar:2.4:test
[INFO] +-
org.codehaus.groovy.modules.http-builder:http-builder:jar:0.7.1:test
[INFO] | +- net.sf.json-lib:json-lib:jar:jdk15:2.3:test
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.8.0:test
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:test
[INFO] | | +- commons-logging:commons-logging:jar:1.1.1:test
[INFO] | | \- net.sf.ezmorph:ezmorph:jar:1.0.6:test
[INFO] | \- xml-resolver:xml-resolver:jar:1.2:test
[INFO] +- org.apache.poi:poi:jar:3.10-FINAL:test
[INFO] | \- commons-codec:commons-codec:jar:1.5:test
[INFO] +- net.sf.jacob-project:jacob:jar:1.14.3:test
[INFO] +- com.sun.jna:jna:jar:3.0.9:test
[INFO] +- com.googlecode.autoitx4java:AutoItX4Java:jar:1.0:test
[INFO] +- net.sf.jpdfunit:jpdfunit:jar:1.2:test
[INFO] | \- org.apache.pdfbox:pdfbox:jar:1.8.5:test
[INFO] | +- org.apache.pdfbox:fontbox:jar:1.8.5:test
[INFO] | \- org.apache.pdfbox:jempbox:jar:1.8.5:test
[INFO] +- org.gebish:geb-core:jar:0.9.3:test
[INFO] | +- org.gebish:geb-ast:jar:0.9.3:test
[INFO] | \- org.gebish:geb-waiting:jar:0.9.3:test
[INFO] | \- org.gebish:geb-implicit-assertions:jar:0.9.3:test
[INFO] \- org.codehaus.groovy:groovy-all:jar:2.1.5:compile

sele...@googlecode.com

unread,
Jun 17, 2014, 10:48:40 AM6/17/14
to selenium-develope...@googlegroups.com

Comment #4 on issue 7480 by barancev: java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

The attached maven project works as expected for me, you can try it to
retest the issue.

Attachments:
sample.zip 1.6 KB

sele...@googlecode.com

unread,
Jun 17, 2014, 11:52:25 AM6/17/14
to selenium-develope...@googlegroups.com

Comment #5 on issue 7480 by mark.le...@gmail.com:
java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

Nothing in my project changed, but I cannot reproduce it today. :(
The magic gnomes fell asleep today?

sele...@googlecode.com

unread,
Aug 13, 2014, 4:18:33 PM8/13/14
to selenium-develope...@googlegroups.com

Comment #6 on issue 7480 by jonathan...@incapturetechnologies.com:
java.lang.NoSuchFieldError: INSTANCE
http://code.google.com/p/selenium/issues/detail?id=7480

I get the same error using 'org.seleniumhq.selenium:selenium-java:2.42.3'.
when I switched to 2.42.2 I was able to launch chrome. I'm using gradle and
testng.

sele...@googlecode.com

unread,
Sep 3, 2014, 4:09:09 AM9/3/14
to selenium-develope...@googlegroups.com

Comment #7 on issue 7480 by shakun.t...@gmail.com:
java.lang.NoSuchFieldError: INSTANCE
https://code.google.com/p/selenium/issues/detail?id=7480

Just check whether you have two same jar with different version. I got the
same error then I figured I have duplicate jars with different version.
After removing those duplicate jars I am able to launch the browser.

sele...@googlecode.com

unread,
Dec 15, 2014, 1:20:50 AM12/15/14
to selenium-develope...@googlegroups.com

Comment #8 on issue 7480 by muthu.ka...@gmail.com:
java.lang.NoSuchFieldError: INSTANCE
https://code.google.com/p/selenium/issues/detail?id=7480

#7 shakun.t...@gmail.com was correct.
Thanks,
Muthu.
Reply all
Reply to author
Forward
0 new messages