[jbosscache-dev] implement Serializable in POJOCache
Kavitha Durai
Kavitha.Durai at rohatyngroup.com
Wed Jan 6 07:49:37 EST 2010
As per POJOCache specification any non serializable object can be
serialized but when I use Person Class without implementing
Serializable it throws following error.
If I implements Serializableit works well , So IN POJO Cache does class
need to implement Serializable.?
Exception in thread "main" org.jboss.cache.pojo.PojoCacheException:
Failed starting org.jboss.cache.CacheException:
java.lang.reflect.InvocationTargetException
at
org.jboss.cache.pojo.impl.PojoCacheImpl.start(PojoCacheImpl.java:316)
at
org.jboss.cache.pojo.passivation.TRGLocalTest.setUp(TRGLocalTest.java:56
)
at
org.jboss.cache.pojo.passivation.TRGLocalTest.main(TRGLocalTest.java:132
)
Caused by: org.jboss.cache.CacheException:
java.lang.reflect.InvocationTargetException
at
org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionU
til.java:148)
at
org.jboss.cache.factories.ComponentRegistry$PrioritizedMethod.invoke(Com
ponentRegistry.java:970)
at
org.jboss.cache.factories.ComponentRegistry.internalStart(ComponentRegis
try.java:746)
at
org.jboss.cache.factories.ComponentRegistry.start(ComponentRegistry.java
:610)
at
org.jboss.cache.invocation.CacheInvocationDelegate.start(CacheInvocation
Delegate.java:355)
at
org.jboss.cache.pojo.impl.PojoCacheImpl.start(PojoCacheImpl.java:312)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionU
til.java:144)
... 7 more
Caused by: org.jboss.cache.CacheException:
java.io.InvalidClassException: org.jboss.cache.pojo.test.Person;
org.jboss.cache.pojo.test.Person; class invalid for deserialization
at
org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.ja
va:277)
at
org.jboss.cache.invocation.CacheInvocationDelegate.get(CacheInvocationDe
legate.java:448)
at
org.jboss.cache.loader.CacheLoaderManager.preload(CacheLoaderManager.jav
a:352)
at
org.jboss.cache.loader.CacheLoaderManager.preload(CacheLoaderManager.jav
a:383)
at
org.jboss.cache.loader.CacheLoaderManager.preload(CacheLoaderManager.jav
a:383)
at
org.jboss.cache.loader.CacheLoaderManager.preload(CacheLoaderManager.jav
a:383)
at
org.jboss.cache.loader.CacheLoaderManager.preload(CacheLoaderManager.jav
a:383)
at
org.jboss.cache.loader.CacheLoaderManager.preloadCache(CacheLoaderManage
r.java:325)
... 12 more
Caused by: java.io.InvalidClassException:
org.jboss.cache.pojo.test.Person; org.jboss.cache.pojo.test.Person;
class invalid for deserialization
at
java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733
)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarsha
ller200.java:582)
at
org.jboss.cache.marshall.CacheMarshaller200.populateFromStream(CacheMars
haller200.java:800)
at
org.jboss.cache.marshall.CacheMarshaller200.unmarshallHashMap(CacheMarsh
aller200.java:763)
Regards,
Kavitha Durai,
This e-mail communication and any attachments may contain confidential and privileged information and are for use by the intended addressee(s) only. If you are not the intended addressee, you have received this communication in error. Any dissemination or reproduction of this email or its contents is strictly prohibited and may be unlawful. If you suspect you have received this communication in error, please notify us immediately by replying to this message and delete it from your computer.Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosscache-dev/attachments/20100106/8e73a616/attachment-0001.html
More information about the jbosscache-dev
mailing list