• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

could not deserialize  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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(SerializationHelper.java:217)
at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
bla...bla...bla...
Caused by: java.io.StreamCorruptedException: invalid stream header
blablabla...


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 ]
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Inbox class needs to implement the Serializable interface.

Mark
 
Arief Setiawan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Arief Setiawan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!