When trying get in memcache client, getting the below excepton.
Caused by: java.io.IOException: com.fet.myclass.webservice.data.DataList
at com.schooner.MemCached.ObjectTransCoder.decode(Unknown Source)
Please help. Thanks.
EDIT:
DataList is my own object. Is there any constraints like, only native java objects can be cached, like that?
The MemCached.ObjectTransCoder decode method rely on the
java.io.ObjectInputStreamto deserialize the cached Java objects from the cache.So, first, you have to check that your DataList object is serializable. That is: it implements the
java.io.Serializableinterface, and also all its class level attributes are primitive types or serializable objects by themselves.Also, reviewing the component code listed here the decode methods are implemented in such a way that a ClassNotFoundException gets wrapped inside an IOExpcetion using the class name as its message, which seems to be happening here.
So, as a second point, you should check if the process where you are getting this error, has your class included at its classpath (via -cp argument, or whatever the case), and if the class name exposed at the error matches exactly you class full qualified name.