Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spymemcached throws ClassNotFoundException from SerializingTranscoder for BasicClientCookie

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.
like image 728
pulkitsinghal Avatar asked Nov 16 '25 21:11

pulkitsinghal


1 Answers

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)
...
like image 61
pulkitsinghal Avatar answered Nov 19 '25 13:11

pulkitsinghal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!