This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes could not deserialize Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "could not deserialize" Watch "could not deserialize" New topic

could not deserialize

Arief Setiawan

Joined: Sep 06, 2006
Posts: 12
Hi All,

I'm begginer in hibernate. help me, please...

I have Inbox class as shown below:

This is my mapping:

the problem is when i try to get column except primary key
i get this error :

org.hibernate.type.SerializationException: could not deserialize
at org.hibernate.util.SerializationHelper.deserialize(
at org.hibernate.util.SerializationHelper.deserialize(
Caused by: invalid stream header

this is my source code:

any idea to get inboxfrom and inboxto ?

Best Regards,

[Added code tags - Paul Sturrock]
[ September 12, 2006: Message edited by: Paul Sturrock ]
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

Your Inbox class needs to implement the Serializable interface.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Arief Setiawan

Joined: Sep 06, 2006
Posts: 12
thanks Paul for add code tag & Mark for your response

i have already implement Selializable interface in my Inbox class

but i still got same error

Arief Setiawan

Joined: Sep 06, 2006
Posts: 12
I'm sorry, this is my fault

actualy, my table contain clob field, and i think that's no sense in this case. But i was wrong.
this field has generated as serializable field.
I change field mapping to clob, and at Inbox class to java.sql.clob.
no error anymore...

Thank's all
I agree. Here's the link:
subject: could not deserialize