Hello,

when i abort a request and after that, start a new one with my
DefaultHttpClient i get the following exception:
29207 [Thread-3] WARN
org.apache.http.impl.conn.SingleClientConnManager  - Invalid use of
SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
java.lang.IllegalStateException: Revoking connection to
HttpRoute[{}->http://selfhtml.mijabo.de:80]
        at 
org.apache.http.impl.conn.SingleClientConnManager.revokeConnection(SingleClientConnManager.java:345)
        at 
org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:220)
        at 
org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:195)
        at 
org.apache.http.impl.client.DefaultClientRequestDirector.allocateConnection(DefaultClientRequestDirector.java:508)
        at 
org.apache.http.impl.client.DefaultClientRequestDirector.execute(DefaultClientRequestDirector.java:293)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:500)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:463)
        at 
org.downman.download.http.HttpDownload$HttpDownloader.requestFileInfo(HttpDownload.java:294)
        at 
org.downman.download.http.HttpDownload$HttpDownloader.initializeDownloader(HttpDownload.java:423)
        at 
org.downman.download.http.HttpDownload$HttpDownloader.run(HttpDownload.java:536)
        at java.lang.Thread.run(Thread.java:619)

Allthough it is only a warning I followed the given adivce and tried
the following after i abort a request:
this.REQUEST.abort();
try {
    this.CLIENT.getConnectionManager().releaseConnection(
            this.CLIENT.getConnectionManager().getConnection(new
HttpRoute(HttpDownload.this.HOST)));
}
catch(InterruptedException e) {
    LOG.warn("Releasing the connection failed for download: "
            + HttpDownload.this.getSource().toString(), e);
}

After that the warning did not appear anymore after starting a new
request, but for some reason this exception appeared as warning when
aborting/trying to release the connection:
40827 [Thread-3] WARN
org.apache.http.impl.conn.SingleClientConnManager  - Invalid use of
SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
java.lang.IllegalStateException: Revoking connection to
HttpRoute[{}->http://selfhtml.tobias-unger.com:80]
        at 
org.apache.http.impl.conn.SingleClientConnManager.revokeConnection(SingleClientConnManager.java:345)
        at 
org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:220)
        at 
org.downman.download.http.HttpDownload$HttpDownloader.releaseConnection(HttpDownload.java:410)
        at 
org.downman.download.http.HttpDownload$HttpDownloader.finalizeDownloader(HttpDownload.java:527)
        at 
org.downman.download.http.HttpDownload$HttpDownloader.run(HttpDownload.java:601)
        at java.lang.Thread.run(Thread.java:619)

It seems to be the same error. I wanted to ask, what am i doing wrong?
Is it normal to recieve a warning exception when sending requests
after previously aborting one? How can i get rid of this warning?

As a sidenote: I am reusing one and the same HttpRequest (same
instance) and HttpClient multiple times.

Regards,
Jan Bracker

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to