the serialVersion will be recalculated with every new version of your
class,
to avoid this you can define a static classvar named (static fial long)
serialVersionUID (= 320808989715797578) and assign the given number
but now you have to obey if your stored object are compatible to your
runtime version of object
if not you have to delete the stored ones or provide default values in
your readObject()

see Interface Serializable
you have to ensure that the number is unique, try "serialver classname"
at prompt (provided by sun)
that all can be read in java-doc and any basic java book!!!! (e.g. Using
Java 1.2 - Mike Morgan)

/*************************/
 Thomas Schuchert
 Cyberconsult
 Beratungsgesellschaft f�r Neue Medien mbH
 [EMAIL PROTECTED]
 0049 30 - 39 99 05 46
/*************************/


> -----Urspr�ngliche Nachricht-----
> Von:  Rachit Mathur [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 12. Mai 2000 08:11
> An:   [EMAIL PROTECTED]
> Betreff:      problem in getting object from an applet
>
> Hi All,
> I am passing object from applet through URLConnection(that object
> implements Serializable) to a servlet.
> The code was running fine until i made few changes in that object.
> Now my servlet is throwing IO exception  -
>
> javawebserver: io exception occured in service method:
> mypackage.Order;
> Local class not compatible: stream classdesc
> serialVersionUID=320808989715797578
> 1 local class serialVersionUID=-535899856585693639
>
> can anyone suggest what could be the reason for this?
>
> Thanks in advance.
> Rachit

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to