I am currently writing a tool to connect to an existing enterprise application using Hibernate. My tool during installation should write some values ββto the database, where one of the columns is a serialized version of the installation descriptor object. This object has two lists of objects and several primitive types.
My current approach is to create ByteArrayOutputStreamand ObjectOutputStreamthen write ObjectOutputStreamto ByteArrayOutputStreamand then pass the resulting byte array to sql using Spring 1SimpleJdbcTemplate1. My current problem with this approach is that when an enterprise tool pulls my rows, it cannot deceive a column like this:
org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
I feel that I may need to serialize internal objects, but I donβt know how to do this and keep everything together.
source
share