hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: org.apache.http.impl.cookie.BasicClientCookie not serializable???
Date Wed, 09 Jun 2010 21:34:14 GMT
On Wed, 2010-06-09 at 14:20 -0500, Misha Koshelev wrote:
> Dear All:
> 
> I am quite confused... I am reading here and BasicClientCookie _clearly_
> implements Serializable per JavaDoc:
> http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/impl/cookie/BasicClientCookie.html

You are looking at the javadocs for the 4.1 branch of HttpClient

Oleg

> 
> However, my simple Groovy script:
> 
>     #!/usr/bin/env groovy
>     @Grapes(
>         @Grab(group='org.apache.httpcomponents', module='httpclient',
> version='4.0.1')
>     )
>     import org.apache.http.impl.cookie.BasicClientCookie
>     import java.io.File
> 
>     def cookie=new BasicClientCookie("name","value")
>     println cookie instanceof Serializable
>     def f=new File("/tmp/test")
>     f.withObjectOutputStream() { oos->
>         oos.writeObject(cookie)
>     }
> 
> outputs:
> 
>     false
>     Caught: java.io.NotSerializableException:
> org.apache.http.impl.cookie.BasicClientCookie
>     	    at t$_run_closure1.doCall(t.groovy:12)
> 	    at t.run(t.groovy:11)
> 
> I have checked and I have no other versions of HttpClient anywhere in
> classpath (if I take Grapes statement out it cannot find file).
> 
> Thank you!
> Misha Koshelev
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 



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


Mime
View raw message