I have tried to create a android application that sends a serialzed object from the phone to a servlet the contents of the object is the input from the user which i will store in a database using hibernate. I believe the problem is around the serializing and deserializing of the object the code is below. If anyone could help i would very greatful.

why does it need to be architecture neutral if the OP is controlling the servlet?
–
RickMay 14 '11 at 6:22

2

@Rick: The servlet is not the problem. Clients are the problem. Right now, the OP is strictly thinking of Android. First, there is no guarantee that the serialization format for Android is the same as for the server, since they are not running the same runtime. Second, serialization can only possibly work with a Java-ish client, eliminating iOS, Windows Phone, Symbian, Javascript (WebOS, AJAX/HTML5), Flash, or any non-Java desktop environment. Smart programmers box themselves in as few corners as possible.
–
CommonsWareMay 14 '11 at 10:49

I second the suggestion of XStream. It is a very nice and easy API. I don't like the Serialization formats XML or JSON though because they are text based. For a more compact serialization format, try ProtoBuf from Google.