You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Christian Thieme (Created) (JIRA)" <ji...@apache.org> on 2012/03/14 11:36:38 UTC

[jira] [Created] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

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.3, 4.1.2
         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 hours:

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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Alexey Panteleev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509581#comment-13509581 ] 

Alexey Panteleev commented on HTTPCLIENT-1173:
----------------------------------------------

Hello, I am experience a similar issue after my multi-threaded daemon runs for a few hours.
How did this issue get resolved? I would really appreciate some help.

The 189 line is simply "for (Cookie cookie: cookies)"

Caused by: java.util.NoSuchElementException: null
        at java.util.ArrayList$Itr.next(ArrayList.java:757) ~[na:1.6.0_18]
        at org.apache.http.impl.cookie.BestMatchSpec.formatCookies(BestMatchSpec.java:189) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:196) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108) ~[httpcore-4.1.4.jar:4.1.4]
        at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174) ~[httpcore-4.1.4.jar:4.1.4]
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) ~[httpclient-4.1.3.jar:4.1.3]
                
> 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 hours:
> 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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "U. Weiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509613#comment-13509613 ] 

U. Weiss commented on HTTPCLIENT-1173:
--------------------------------------

I'm running debian and JM6 as well, it is most likely a JVM bug, as the code itself looks fine. Maybe rewriting to a more simple syntax would help?
                
> 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 hours:
> 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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Alexey Panteleev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509618#comment-13509618 ] 

Alexey Panteleev commented on HTTPCLIENT-1173:
----------------------------------------------

I wonder if any jvm options like -XX:LoopUnrollLimit=1 would help:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7044738
                
> 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 hours:
> 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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229649#comment-13229649 ] 

Sebb commented on HTTPCLIENT-1173:
----------------------------------

I agree with Oleg.

Could it be a JVM optimiser bug? 
There was one last year in Java 7 that caused problems for Lucene and Solr.
Worth checking that you have any relevant patches applied.

>> The requests do not contain any cookies. 

That is strange, because the code at RequestAddCookies.java:196 is only invoked if it finds a valid cookie.
Are you using your own CookieStore?
                
> 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 hours:
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Resolved] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Oleg Kalnichevski (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1173.
-------------------------------------------

    Resolution: Cannot Reproduce
    
> 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 hours:
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229608#comment-13229608 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1173:
-----------------------------------------------

I can't find anything wrong with the code just based on this exception stack trace. RequestAddCookies always creates a local instance of List<Cookie> [1]. So, this can't be a threading issue.  BestMatchSpec does not explicitly call ArrayList#Itr.next. It uses 'for each' loop to iterate list items [2]. 

I will not be able to do much without a reproducer.

Oleg 

[1] hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/client/protocol/RequestAddCookies.html#178
[2] http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/cookie/BestMatchSpec.html#189
                
> 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 hours:
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509596#comment-13509596 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1173:
-----------------------------------------------

Alexey
No one is working on this issue because it does not have a reproducer. See my comment above.

Oleg
                
> 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 hours:
> 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


[jira] [Issue Comment Edited] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Oleg Kalnichevski (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229608#comment-13229608 ] 

Oleg Kalnichevski edited comment on HTTPCLIENT-1173 at 3/14/12 9:01 PM:
------------------------------------------------------------------------

I can't find anything wrong with the code just based on this exception stack trace. RequestAddCookies always creates a local instance of List<Cookie> [1]. So, this can't be a threading issue.  BestMatchSpec does not explicitly call ArrayList#Itr.next. It uses 'for each' loop to iterate list items [2]. 

I will not be able to do much without a reproducer.

Oleg 

[1] http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/client/protocol/RequestAddCookies.html#178
[2] http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/cookie/BestMatchSpec.html#189
                
      was (Author: olegk):
    I can't find anything wrong with the code just based on this exception stack trace. RequestAddCookies always creates a local instance of List<Cookie> [1]. So, this can't be a threading issue.  BestMatchSpec does not explicitly call ArrayList#Itr.next. It uses 'for each' loop to iterate list items [2]. 

I will not be able to do much without a reproducer.

Oleg 

[1] hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/client/protocol/RequestAddCookies.html#178
[2] http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/cookie/BestMatchSpec.html#189
                  
> 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 hours:
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Alexey Panteleev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509583#comment-13509583 ] 

Alexey Panteleev commented on HTTPCLIENT-1173:
----------------------------------------------

And I am getting this also. Any ideas?

Caused by: java.lang.ArrayIndexOutOfBoundsException: -404214856
        at java.util.ArrayList$Itr.next(ArrayList.java:762) ~[na:1.6.0_18]
        at org.apache.http.impl.cookie.BestMatchSpec.formatCookies(BestMatchSpec.java:189) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:196) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108) ~[httpcore-4.1.4.jar:4.1.4]
        at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174) ~[httpcore-4.1.4.jar:4.1.4]
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) ~[httpclient-4.1.3.jar:4.1.3]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) ~[httpclient-4.1.3.jar:4.1.3]
                
> 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 hours:
> 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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509612#comment-13509612 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1173:
-----------------------------------------------

Alexey
That's the whole thing. The code creates a local instance of ArrayList and uses for loop to iterate over it. It is very unlikely to be a thread safety issue. I just do not see how these exceptions can be thrown unless there is something wrong at the at the byte code / JVM level.

Oleg
                
> 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 hours:
> 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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "U. Weiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495099#comment-13495099 ] 

U. Weiss commented on HTTPCLIENT-1173:
--------------------------------------

did you eventually find a workaround or fix? I'm having the same problems and the only workaround so far is restarting the application...
                
> 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 hours:
> 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


[jira] [Commented] (HTTPCLIENT-1173) NoSuchElementException in org.apache.http.impl.cookie.BestMatchSpec.formatCookies

Posted by "Alexey Panteleev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509610#comment-13509610 ] 

Alexey Panteleev commented on HTTPCLIENT-1173:
----------------------------------------------

Even though it happens on a daily basis in our complex daemon it's kinda tough to create a simple testcase to post here.
I really don't understand which threads and in which combination have to run to reproduce this.
What I know though is that once this happens in one thread (httpclient connecting to an EWS server) this starts happening in all other threads (connecting to similar EWS servers). As if some kind of memory corruption happened and affected all following executions :(

How can ArrayIndexOutOfBoundsException happen in the for loop itself? Another thread changing the array? But then a negative index?
I use Debian + JVM 6. Googleing JVM bugs now ... 
                
> 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 hours:
> 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