I just tryed the linked version. When i try to execute a request with
the HttpClient i previously aborted a request from the same exceptions
occures as warning:
47492 [Thread-5] 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://www.dfr-software.de:80]
at
org.apache.http.impl.conn.SingleClientConnManager.revokeConnection(SingleClientConnManager.java:339)
at
org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:215)
at
org.apache.http.impl.conn.SingleClientConnManager$1.getConnection(SingleClientConnManager.java:186)
at
org.apache.http.impl.client.DefaultClientRequestDirector.execute(DefaultClientRequestDirector.java:294)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:501)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:464)
at
org.downman.download.http.HttpDownload$HttpDownloader.requestFileInfo(HttpDownload.java:297)
at
org.downman.download.http.HttpDownload$HttpDownloader.initializeDownloader(HttpDownload.java:428)
at
org.downman.download.http.HttpDownload$HttpDownloader.run(HttpDownload.java:543)
at java.lang.Thread.run(Thread.java:619)
It seems the exception still occures...
2008/4/18, Sam Berlin <[EMAIL PROTECTED]>:
> Ya, 4.0. There's some snapshots available @ people.apache.org, the
> latest of which appears to be:
>
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/httpcomponents/httpclient/4.0-alpha4-SNAPSHOT/httpclient-4.0-alpha4-20080417.184048-7.jar
> . I can't guarantee they'll work (as the API is in flux), but if your
> code can compile against it and run, and the error goes away, atleast
> we can verify that the bug is indeed fixed for the next alpha release.
>
>
> Sam
>
> On 4/18/08, Jan Bracker <[EMAIL PROTECTED]> wrote:
> > Sorry, i don't have any experience with building maven projects...
> >
> > I forget to say that i'm working with 4.0, not that we missunderstand :)
> >
> > 2008/4/18, Sam Berlin <[EMAIL PROTECTED]>:
> > > This is likely due to a problem with the last alpha release of
> > > HttpClient. Aborted connections weren't properly released back to
> > > connection managers. It's been fixed, but I'm not sure a new release
> > > was issued.
> > >
> > > Is it possible to try building httpclient from source and see if the
> > > problem still occurs?
> > >
> > > Sam
> > >
> > >
> > > On 4/18/08, Jan Bracker <[EMAIL PROTECTED]> wrote:
> > > > 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]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]