Invalid use of SingleClientConnManager: connection still allocated.

563 views
Skip to first unread message

cubetree-qa

unread,
Mar 4, 2011, 4:13:17 PM3/4/11
to webdriver
Hello All,

version : beta 2
driver: firefoxdriver
webdriver server running on windows 7
junits runnning on linux(don't know if that matters here)

The use case is that we use webdriver to find the links on the page,
go through each url via RemoteWebDriver and verify for page title. the
tests run quickly. however once in a while we get an error like below.

as per some docs on the net, the error comes when the response isn't
fully consumed. Could you please check whether this is a bug in
webdriver code that it sometimes doesn't consume the response fully
before moving on?
If you already aware of the issue, please suggest any alternatives.?


java.lang.IllegalStateException: Invalid use of
SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
at
org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:
199)
at org.apache.http.impl.conn.SingleClientConnManager
$1.getConnection(SingleClientConnManager.java:173)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:
390)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
641)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:
225)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
336)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
356)
at
org.openqa.selenium.remote.RemoteWebDriver.getTitle(RemoteWebDriver.java:
153)

Guillaume

unread,
Apr 1, 2011, 9:36:38 AM4/1/11
to webdriver
Hi,

We're getting this same issue intermittently with selenium 2.0b2
firefoxdriver running on centOS 5 64bit (everything running there,
junit java selenium, app server, etc..)

See our stacktrace:

Make sure to release the connection before allocating another one.
java.lang.IllegalStateException: Invalid use of
SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
at
org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:
199)
at org.apache.http.impl.conn.SingleClientConnManager
$1.getConnection(SingleClientConnManager.java:173)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:
390)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
641)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:
246)
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:
123)
at org.openqa.selenium.firefox.FirefoxDriver
$LazyCommandExecutor.execute(FirefoxDriver.java:256)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
390)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
414)
at
org.openqa.selenium.remote.RemoteWebDriver.getPageSource(RemoteWebDriver.java:
276)
at
org.openqa.selenium.internal.seleniumemulation.GetHtmlSource.handleSeleneseCommand(GetHtmlSource.java:
25)
at
org.openqa.selenium.internal.seleniumemulation.GetHtmlSource.handleSeleneseCommand(GetHtmlSource.java:
22)
at
org.openqa.selenium.internal.seleniumemulation.SeleneseCommand.apply(SeleneseCommand.java:
29)
at
org.openqa.selenium.internal.seleniumemulation.Timer.run(Timer.java:
61)
at
org.openqa.selenium.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:
274)
at
org.openqa.selenium.WebDriverCommandProcessor.getString(WebDriverCommandProcessor.java:
245)
at
com.unitedinternet.portal.selenium.utils.logging.LoggingCommandProcessor.getString(LoggingCommandProcessor.java:
243)
at
com.thoughtworks.selenium.DefaultSelenium.getHtmlSource(DefaultSelenium.java:
579)
at com.macys.stella.testutils.framework.HTMLSourceDumperJUnit4Runner
$1.evaluate(HTMLSourceDumperJUnit4Runner.java:54)
at org.junit.internal.runners.statements.FailOnTimeout
$1.run(FailOnTimeout.java:28)
Reply all
Reply to author
Forward
0 new messages