hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPASYNC-104) IlligalStateException when using the same client for mutiple requests.
Date Wed, 09 Mar 2016 13:58:40 GMT

    [ https://issues.apache.org/jira/browse/HTTPASYNC-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187119#comment-15187119
] 

Oleg Kalnichevski commented on HTTPASYNC-104:
---------------------------------------------

{noformat}
Exception in thread "Thread-12" java.lang.NullPointerException
	at sun.nio.ch.Util.atBugLevel(Util.java:448)
	at sun.nio.ch.SelectorImpl.<init>(SelectorImpl.java:40)
	at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:102)
	at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
	at java.nio.channels.Selector.open(Selector.java:209)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.<init>(AbstractMultiworkerIOReactor.java:144)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.<init>(DefaultConnectingIOReactor.java:81)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.<init>(DefaultConnectingIOReactor.java:107)
	at domain.hardware.http.HttpRequestPublisher1.<init>(HttpRequestPublisherTester.java:236)
	at domain.hardware.http.HttpHandler1.makeAsyncHttpGetRequest(HttpRequestPublisherTester.java:167)
	at domain.hardware.http.HttpRequestPublisherTester.run(HttpRequestPublisherTester.java:44)
	at java.lang.Thread.run(Thread.java:662)
{noformat}

Something inside Sun's code goes boom with a NPE, which causes HttpAsyncClient to shut down
making execution of any further requests impossible. 

How exactly is this a bug in HttpAsyncClient?

Oleg

> IlligalStateException when using the same client for mutiple requests.
> ----------------------------------------------------------------------
>
>                 Key: HTTPASYNC-104
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-104
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.1.1
>         Environment: JDK 1.6
>            Reporter: maria deepak marneni
>         Attachments: HttpAsyncResponseHandler.java, HttpRequestPublisherTester.java,
eclipseOutput-1, eclipseOutput.txt
>
>
> In a multi thread environment where all requests use the same client. CloseableHttpAsyncClient
throws illegalStateException when execute method is called.
> Exception in thread "Thread-91" java.lang.IllegalStateException: Request cannot be executed;
I/O reactor status: STOPPED
> 	at org.apache.http.util.Asserts.check(Asserts.java:46)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
> 	at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:74)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:107)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:91)
> 	at domain.hardware.http.HttpRequestPublisher1.execute(HttpRequestPublisherTester.java:282)
> 	at domain.hardware.http.HttpHandler1.makeAsyncHttpGetRequest(HttpRequestPublisherTester.java:179)
> 	at domain.hardware.http.HttpRequestPublisherTester.run(HttpRequestPublisherTester.java:48)
> 	at java.lang.Thread.run(Thread.java:662)
> Exception in thread "Thread-46" java.lang.IllegalStateException: Request cannot be executed;
I/O reactor status: STOPPED
> 	at org.apache.http.util.Asserts.check(Asserts.java:46)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
> 	at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:74)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:107)
> 	at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:91)
> 	at domain.hardware.http.HttpRequestPublisher1.execute(HttpRequestPublisherTester.java:282)
> 	at domain.hardware.http.HttpHandler1.makeAsyncHttpGetRequest(HttpRequestPublisherTester.java:179)
> 	at domain.hardware.http.HttpRequestPublisherTester.run(HttpRequestPublisherTester.java:48)
> 	at java.lang.Thread.run(Thread.java:662)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message