Hi, I come across this weird problem in client server programming. The server application will use its writeObject method to output a customed object to client when a request comes in. This customed class implements Serialiable interface and it is put in the same directory as the server application. No packaging is applied in the code. At client side, the same customed class is put in the same directory as client application. When client reads in the object, the object is casted to the customed class. Data is read successfully from the customed class at client side. Then i take a step further and put client application and the customed class in a package. The casting step fails. NoClassFoundError is caught. After some tweaking, i discover that if i use the same package name on server side, casting will work and everything. My concern is, should customed Serializable class must be packaged the same way at server and client side? Otherwise the casting will fail? Regards,
PS. Please help me to move this topic to the appropriate forum. I accidentally put it here. Thanks. [ August 16, 2002: Message edited by: SoonAnn Lim ]
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!