Custom ArrayList serialization

Posted by rayman on Stack Overflow See other posts from Stack Overflow or by rayman
Published on 2010-05-30T11:03:49Z Indexed on 2010/05/30 11:12 UTC
Read the original article Hit count: 197

Filed under:
|
|

Hi, i was trying to serialize an ArrayList which contacins custom objects.

I`am serializing it in a servlet(server side), and deserialize at the client side.

(using ObjectOutputStream,ObjectInputStream)

it worked fine, when I work with ArrayList< String>

but when i tried it with ArrayList< MyObject> i couldnt get any results in the client side, this is the exception:

java.lang.ClassNotFoundException: web.MyObject

*ofcourse that i have done this: MyObject implements Serializable ...

MyObject contains only String fields in it.

what have I done worng?

Thanks, ray.

© Stack Overflow or respective owner

Related posts about java

Related posts about android