Forums Register Login

Serializable

+Pie Number of slices to send: Send
Hi,

I want to know if byte[] is serializable. Also how to i check if the entire obejct is serializable? I have an object which implements serializable, but at run time am getting NotSerializableExceptionexception. This happens only when I tun the app in clustered mode using apache and tomcat.

If I tun it in non clustered mode....everything looks fine.



An yhelp on this...pls
[ September 24, 2006: Message edited by: Mary Cole ]
+Pie Number of slices to send: Send
The error message tells you the nonserializable class:

java.io.NotSerializableException: com.icon.ntral.form.IrEnt$2

That's the second anonymous class defined in the class com.icon.ntral.form.IrEnt .
+Pie Number of slices to send: Send


This is my code in the inner class ...how do i make it serializable...The parent class implements serializable

Pls advice
+Pie Number of slices to send: Send
You'd just have to make it into a named class -- i.e., define it inside the method or inside the class, rather than as an anonymous class, or even as a new top-level class (since it doesn't seem to need access to the enclosing class for anything.) Once you give it a name, then it's obvious how to declare that it implements Serializable.
+Pie Number of slices to send: Send
Can U pls elaborate on this....may be a sample code would help....pls its urgent

The Factory defined above is of type org.apache.commons.collections.Factory
[ September 26, 2006: Message edited by: Mary Cole ]
+Pie Number of slices to send: Send
One option would just be this:

+Pie Number of slices to send: Send
Thanks a lot it worked
+Pie Number of slices to send: Send
God bless you guys! I had the same problem with the LazyList factory (inner class). Your postings were spot on.
Thanks a ton,
Abhijeet
Don't touch me. And dont' touch this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1582 times.
Similar Threads
? File I/O (and-or) for each loop
serialization for class Object references
NotSerializableException
SocketClientInvoker NotSerializableException
no targets are reachable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:27:02.