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-114) NPE when AuthStates have not manually been entered to HttpClientContext
Date Wed, 14 Sep 2016 14:49:20 GMT

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

Oleg Kalnichevski commented on HTTPASYNC-114:
---------------------------------------------

Is you code using {{HttpContext}} instances concurrently and if so is it synchronizing access
to those instances?

Oleg

> NPE when AuthStates have not manually been entered to HttpClientContext
> -----------------------------------------------------------------------
>
>                 Key: HTTPASYNC-114
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-114
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Tuomas Kiviaho
>
> I'm getting an unexpected NPE from authentication when I changed from HTTPCLIENT to HTTPASYNC.

> It seems that {{MainClientExec}} of HTTPCLIENT is capable of filling in missing {{AuthState}}s
of {{localContext}} such as {{targetAuthState}} and {{proxyAuthState}}. 
> {code}
> Caused by: java.lang.Throwable: java.lang.NullPointerException
>     at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:178)
>     at org.apache.http.impl.nio.client.MainClientExec.generateRequest(MainClientExec.java:224)
>     at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.generateRequest(DefaultClientExchangeHandlerImpl.java:130)
>     at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.requestReady(HttpAsyncRequestExecutor.java:185)
>     at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.connected(HttpAsyncRequestExecutor.java:130)
>     at org.apache.http.impl.nio.client.InternalIODispatch.onConnected(InternalIODispatch.java:63)
>     at org.apache.http.impl.nio.client.InternalIODispatch.onConnected(InternalIODispatch.java:39)
>     at org.apache.http.impl.nio.reactor.AbstractIODispatch.connected(AbstractIODispatch.java:73)
>     at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionCreated(BaseIOReactor.java:248)
>     at org.apache.http.impl.nio.reactor.AbstractIOReactor.processNewChannels(AbstractIOReactor.java:427)
>     at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:287)
>     at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
>     at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
>     ... 1 more
> {code}



--
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