Hey folks,
i don't know if it's a hibernate specific problem!
2 users before me has [/i]an equal problem but no solution!
http://forum.hibernate.org/viewtopic.php?t=925672&highlight=eofexception
http://forum.hibernate.org/viewtopic.php?t=924626&highlight=eofexception
I have bidirectional one-to-many beetween JasBean(parent) and KeyValueTuple(child)!
The KeyValueTuple has as a property an object, so it has two columns for the id and the class-name to reference the object!
The insert does work, everythings in my database as i want,
but if i try to get acces on the JasBean as follow:
Code:
currentSession().delete("from JasBean as t ");
or
Code:
currentSession().find("from JasBean as t where t.uniqueSequence > 0" );
the following error occured:
Code:
[junit] Caused an ERROR
[junit] could not deserialize
[junit] net.sf.hibernate.type.SerializationException: could not deserialize
[junit] at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:197)
[junit] at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:220)
[junit] at net.sf.hibernate.type.SerializableType.fromBytes(SerializableType.java:73)
[junit] at net.sf.hibernate.type.SerializableType.get(SerializableType.java:38)
[junit] at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
[junit] at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:74)
[junit] at net.sf.hibernate.type.ObjectType.hydrate(ObjectType.java:109)
[junit] at net.sf.hibernate.loader.Loader.hydrate(Loader.java:606)
...
[junit] Caused by: java.io.EOFException
[junit] at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2581)
[junit] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1834)
[junit] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
[junit] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
[junit] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
[junit] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
[junit] at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:190)
The intersting point is, if there are 20 KeyValueTuples in database everything works fine, just if there are 32 or more KeyValueTuples the above error occured!
the following statement, is the last before the error:
Code:
[STDOUT] Hibernate: select keyvalue0_.uniqueSequence as uniqueSe1_, keyvalue0_.TupleKey as TupleKey, keyvalue0_.class_name as class_name, keyvalue0_.class_id as class_id from KeyValueTuple keyvalue0_
I think it could be a mysql buffer-size-problem,
i've done something wrong with the relation or the object as property!?
somebody have an idea?
N8chtschwaermer