hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1178) NPE thrown in DefaultUserTokenHandler
Date Sat, 31 Mar 2012 11:34:25 GMT

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

Oleg Kalnichevski resolved HTTPCLIENT-1178.
-------------------------------------------

    Resolution: Invalid

Cory,
This pretty much explains it. I also looked at the exception stack traces and found out NPEs
were most likely caused by concurrent modification of the context content by multilpe threads.

HttpContext instances may not be shared by multiple threads regardless whether the implementation
itself is thread safe or not, as they may contain non-thread safe objects such as HttpConnection
and AuthState.

Each thread of execution should have a dedicated HttpContext instance.

Oleg
                
> NPE thrown in DefaultUserTokenHandler
> -------------------------------------
>
>                 Key: HTTPCLIENT-1178
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1178
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.3
>            Reporter: Cory Lum
>
> java.lang.NullPointerException
> 	at org.apache.http.impl.client.DefaultUserTokenHandler.getAuthPrincipal(DefaultUserTokenHandler.java:91)
> 	at org.apache.http.impl.client.DefaultUserTokenHandler.getUserToken(DefaultUserTokenHandler.java:72)
> 	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:516)
> 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
> 	at some.package.SomeClass.execute(SomeClass.java:123)
> -or-
> java.lang.NullPointerException
> 	at org.apache.http.impl.client.DefaultUserTokenHandler.getUserToken(DefaultUserTokenHandler.java:79)
> 	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:516)
> 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
> 	at some.package.SomeClass.execute(SomeClass.java:123)

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


Mime
View raw message