[ 
https://issues.apache.org/jira/browse/HTTPASYNC-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPASYNC-114.
-----------------------------------------
    Resolution: Invalid

> 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-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to