hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill van Melle (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies
Date Wed, 30 Jan 2013 23:59:13 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13567119#comment-13567119

Bill van Melle commented on HTTPCLIENT-1173:

For what it's worth, this just happened to me, too (under Windows 7 / Oracle Java 7.0), and
my program has very few theads.  The error occurred quite a few times before I noticed it
(my code catches errors and quietly retries after a few seconds).  I happened to be running
under the debugger at the time, so I set a breakpoint on the line in question in formatCookies.
 Looked pretty innocent (there were the expected two cookies), and as you say, it can't be
a threading issue, given that you're working on a local copy.  After a couple of times around
the debugger the problem cleared itself up.
> NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies
> ---------------------------------------------------------------------------------
>                 Key: HTTPCLIENT-1173
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1173
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2, 4.1.3
>         Environment: Ubuntu 10.04/OpenJDK 6
>            Reporter: Christian Thieme
> I am using the HTTP client using a ThreadSafeClientConnManager. The application is creating
up to 300 client threads.
> Occasionally the client starts to throw the following exception after running for several
> at java.util.ArrayList$Itr.next(ArrayList.java:757)
>         at org.apache.http.impl.cookie.BestMatchSpec.formatCookies(BestMatchSpec.java:189)
>         at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:196)
>         at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
>         at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)
>         at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462)
>         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
>         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
> The requests do not contain any cookies.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message