Hibernate version:2.1.6
Mapping documents: <property name="description" type="blob" column="DESCRIPTION" />
Name and version of the database you are using:mysql 4
Full stack trace of any exception that occurs:
[junit] null [junit] java.lang.ClassCastException [junit] at net.sf.hibernate.type.BlobType.set(BlobType.java:27) [junit] at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:48) [junit] at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:35) [junit] at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393) [junit] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:466) [junit] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442) [junit] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) [junit] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418) [junit] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371) [junit] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240) [junit] at org.springframework.orm.hibernate.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:214) [junit] at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:177) [junit] at org.springframework.orm.hibernate.HibernateTemplate.save(HibernateTemplate.java:298) [junit] at catalog.model.dao.hibernate.PostingDaoHibernateImpl.savePostingIdentification(PostingDaoHibernateImpl.java:28) [junit] at catalog.model.dao.PostingDAOTest.testAddAndRemoveAndUpdatePosting(PostingDAOTest.java:131) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Debug level Hibernate log excerpt:
Persistent class:
/**
* @return Returns the description.
* @hibernate.property column="DESCRIPTION" type="blob"
*/
public String getDescription() {
return description;
}
Hi guys,
I was trying to to save a String object into Blob type column in MySql 4 and got exception. Pls help.....Thanks !!
regards,
prettyhandling
|