Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Hibernate Serialization Issue

 
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !. I have the following Serialization issue while reading from the database with the Hibernate ORM:
org.hibernate.type.SerializationException: could not deserialize......

java.io.EOFException
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2675)
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3150)
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:859)
java.io.ObjectInputStream.<init>(ObjectInputStream.java:355)
org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:328)
org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:318)
org.hibernate.internal.util.SerializationHelper.doDeserialize(SerializationHelper.java:237)
org.hibernate.internal.util.SerializationHelper.deserialize(SerializationHelper.java:306)
org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:155)
org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:130)
org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:44)
org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:71)
org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267)
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263)
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:338)
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2969)
org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1695)
org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1627)
org.hibernate.loader.Loader.getRow(Loader.java:1514)
org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:725)
org.hibernate.loader.Loader.processResultSet(Loader.java:952)
org.hibernate.loader.Loader.doQuery(Loader.java:920)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
org.hibernate.loader.Loader.doList(Loader.java:2553)
org.hibernate.loader.Loader.doList(Loader.java:2539)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369)
org.hibernate.loader.Loader.list(Loader.java:2364)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:126)
org.hibernate.internal.SessionImpl.list(SessionImpl.java:1682)
org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:380)
com.dgs.databaseServices.dao.impl.GroupsDaoImpl.getRootNodes(GroupsDaoImpl.java:196)

Any clue of why I am getting this ???
Because non of the data types involved are not Serializable !... I dont know what to do...

I am getting this error while reading the following entity:



I am using Java 8 with the following Spring and Hibernate versions:
1) Spring Framework: 4.3.0.RELEASE
2) Spring Security: 4.2.2.RELEASE
3) Hibernate: 4.3.6.FINAL
4) MySQL Connector: 5.1.31
     
 
Rancher
Posts: 4577
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is going on in the method referenced here:
com.dgs.databaseServices.dao.impl.GroupsDaoImpl.getRootNodes(GroupsDaoImpl.java:196)
?
 
AgustinC Cardeilhac Banus
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Tolls. Thanks for answering... Sorry about the delay... It seems some columns of my table had values and they were of type Blob and the java type was not suitable I believe. Thankx for your time
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic