This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with using serializable class  RSS feed

 
netanel weinberg
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i'm using a servlet on my server and a applet that communicate with the servlet to request/reponse data.
i've got a problem with sending a serializable class because although in the servlet's jar and the applet's jar there is the class of the serialized object when trying writing object method to translate it back to and obj he can't find a match 'cause the class that create the object is not the same file class thet the writing method trying to cast to it.

what can i do?
10x ahead,
netanel
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch netanel!

If the exception thrown is InvalidClassException this what the API has to say:

# The serial version of the class does not match that of the class descriptor read from the stream
# The class contains unknown datatypes
# The class does not have an accessible no-arg constructor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!