roc230 / spymemcached

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

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
Ubuntu 10, Spy 2.7.3

Tell me more...
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)

Original issue reported on code.google.com by mcon...@gmail.com on 30 Nov 2011 at 5:47

GoogleCodeExporter commented 9 years ago
Memcached 1.4.2

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

GoogleCodeExporter commented 9 years ago
[deleted comment]
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
Thanks for following up on this.

Original comment by mikewie...@gmail.com on 2 Dec 2011 at 5:54