Hi,
I'm porting a J2EE application from CMP to hibernate.
Now I have the problem that I dont know how to read a double[] stored as a blob from an oracle 9 db.
With CMP the getter/setter uses Serializables. So I tried around with the hibernate types blob and serializable but with no success.
I receive this error with hibernate type serializable:
net.sf.hibernate.type.SerializationException: could not deserialize
at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:197)
at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:220)
at net.sf.hibernate.type.SerializableType.fromBytes(SerializableType.java:73)
at net.sf.hibernate.type.SerializableType.get(SerializableType.java:38)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
at net.sf.hibernate.loader.Loader.hydrate(Loader.java:612)
at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:553)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:512)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:427)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:210)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:134)
at net.sf.hibernate.loader.Loader.doList(Loader.java:952)
at net.sf.hibernate.loader.Loader.list(Loader.java:943)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:836)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483)
at de.solutionary.bps.hibernate.helper.HibernateTest.<init>(HibernateTest.java:65)
at de.solutionary.bps.hibernate.helper.HibernateTest.main(HibernateTest.java:210)
Caused by: java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:189)
... 20 more
Please, can someone tell me how to configure hibernate to read double[] from a blob?
Thanks in advance.
Alex
|