Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 838883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:22:37+00:00 2026-05-15T05:22:37+00:00

I am quite confused… I am reading here and BasicClientCookie clearly implements Serializable per

  • 0

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

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:22:37+00:00Added an answer on May 15, 2026 at 5:22 am

    The javadoc you linked to is for httpclient 4.1 alpha, but you are using httpclient 4.0.1.

    Check the source, it confirms the Serializable interface was added in between 4.0.1 and the trunk.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm quite confused about handling of Key http://msdn.microsoft.com/en-us/library/system.windows.input.key.aspx in a KeyEventArgs. For example: I
As I was reading RedBook I stayed quite confused, that openGL can have maximum
Quite confused here. <html> <head> <style> .one { font-weight: normal; } .two { font-weight:
I'm quite confused. I'm using the animation frames to make the objects move. Here's
I am quite confused setting up cascade deletes in Doctrine 2. Here's what my
I'm quite confused by something. I've got 2 select lists, and if you choose
I'm quite confused about the basic concepts of a Hash table. If I were
I'm quite confused about several books in .NET that I have read. Would someone
I have recently run across these terms few times but I am quite confused
Quite simple really: var req:URLRequest=new URLRequest(); req.url=http://somesite.com; var header:URLRequestHeader=new URLRequestHeader(my-bespoke-header,1); req.requestHeaders.push(header); req.method=URLRequestMethod.GET; stream.load(req); Yet,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.