3

I'm using spymemcached version 2.8.1 to read a cookie object but I keep running into the following exception:

app[web.1]: WARN net.spy.memcached.transcoders.SerializingTranscoder:
                 Caught CNFE decoding 513 bytes of data
app[web.1]: java.lang.ClassNotFoundException
                 org.apache.http.impl.cookie.BasicClientCookie
  1. I am using httpclient version 4.1.1: https://dl.dropbox.com/u/6207935/Screen%20Shot%202013-02-05%20at%202.47.19%20PM.png which has BasicClientCookie class inside of it so I'm not quite sure why it "cannot be found"

  2. Also based on hear-say I think that BasicClientCookie is already marked as Serializable in 4.1.1 but the exact javadocs have been a bit difficult to dig up, honestly ... so its an assumption on my part. Anyway, the exception doesn't seem to be related to serialization but I thought I'd throw this out there for question completeness.

What would be some ideas to resolve this issue?


UPDATE # 1 (Feb 5, 2013)

These may shed some light on the problem:

  1. http://code.google.com/p/spymemcached/issues/detail?id=146 - But when using Heroku I don't know how to obtain the same level of control over my app server's file system ... the way its described here.
  2. http://code.google.com/p/spymemcached/issues/detail?id=155 - Not sure how to get spymemcached to use the custom SerializingTranscoder.
pulkitsinghal
  • 3,855
  • 13
  • 45
  • 84

1 Answers1

5

The advice given here worked: http://code.google.com/p/spymemcached/issues/detail?id=155#c2

The only additional bit was testing it out after applying the custom SerializingTranscoder to spymemcached

MemcachedClient mc =
new MemcachedClient(
new ConnectionFactoryBuilder()
.setTranscoder(new CustomSerializingTranscoder()) // makes it take effect
.setProtocol(ConnectionFactoryBuilder.Protocol.BINARY)
...
pulkitsinghal
  • 3,855
  • 13
  • 45
  • 84