allen8807 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Incorrect Exception Stack : WARN net.spy.memcached.transcoders.SerializingTranscoder: Caught IOException decoding bytes of data #238

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have blogged about it
http://mcondev.wordpress.com/2011/11/29/warn-net-spy-memcached-transcoders-seria
lizingtranscoder-caught-ioexception-decoding-bytes-of-data/

My scenario is,
populate the entire table to memcached
get from memcached
While calling get if I type cast it to "List" instead of Object, I get a 
exception in the code populating the items to cache.
Please check the print stack trace code. Something really screwed here.

I have BBB and CCC extending from a class AAA. While I do a get in CCC,the 
stack trace shows up for BBB. Also in a random piece of code.

2011-11-29 14:49:26.564 WARN 
net.spy.memcached.transcoders.SerializingTranscoder:  Caught IOException 
decoding 308 bytes of data
java.io.InvalidClassException: com.mcruiseon.server.hibernate.DeviceDetails; 
com.mcruiseon.server.hibernate.DeviceDetails; no valid constructor
    at java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:730)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
    at net.spy.memcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializingTranscoder.java:100)
    at net.spy.memcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder.java:66)
    at net.spy.memcached.transcoders.TranscodeService$1.call(TranscodeService.java:42)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at net.spy.memcached.transcoders.TranscodeService$Task.run(TranscodeService.java:89)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.InvalidClassException: 
com.mcruiseon.server.hibernate.DeviceDetails; no valid constructor
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:488)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:327)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1130)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at net.spy.memcached.transcoders.BaseSerializingTranscoder.serialize(BaseSerializingTranscoder.java:81)
    at net.spy.memcached.transcoders.SerializingTranscoder.encode(SerializingTranscoder.java:135)
    at net.spy.memcached.MemcachedClient.asyncStore(MemcachedClient.java:303)
    at net.spy.memcached.MemcachedClient.set(MemcachedClient.java:693)
    at BBB.cache(BBB.java:75)
    at BBb.insertRow(DeviceDetails.java:68)

What version of the product are you using? On what operating system?
Memcached 1.4.2 with spymemcacheclient

Please provide any additional information below.

Original issue reported on code.google.com by mcon...@gmail.com on 29 Nov 2011 at 12:00

GoogleCodeExporter commented 9 years ago
I have opened a bug in spymemcached, sorry for adding the bug here. 
http://code.google.com/p/spymemcached/issues/detail?id=222

Original comment by mcon...@gmail.com on 30 Nov 2011 at 5:48

GoogleCodeExporter commented 9 years ago
Sorry guys, my hibernate pojo's had a lot of inheritance associated with it. 
And the super classes were not serialized, and if I would have serialized it I 
would have compromised performance big time.

The exception here is valid. Please close this bug.

Original comment by mcon...@gmail.com on 2 Dec 2011 at 9:42

GoogleCodeExporter commented 9 years ago
This is a spymemcached 
(http://code.google.com/p/spymemcached/issues/detail?id=222) issue, bug does 
not belong here.

Original comment by eric.d.l...@gmail.com on 2 Dec 2011 at 4:38