Subscribe to rss rss

Hibernate Error : exception setting property value

Posted by : | On : 17-12-2009 | Comments 3
Hibernate Error : exception setting property value
Been playing around with Hibernate and mapping classes with Java. A reason why Hibernate is useful is so to facilitate users to stop writing pure SQL for queries and reduce code redundancy. A slight note, Hibernate also works well with the .NET platform. Though there was this error which TechieDan experienced org.springframework.orm.hibernate3.HibernateSystemException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.tm.ccpm.biz.domain.product.ProductSubCategory.setIdelivery; Surprisingly the mistake wasn’t software based. After looking through Hibernate.org websites and other sites for help, it was because of a simple mistake. While creating the field of IDELIVERY into the table, the default value was null, and considering that the IDELIVERY column is integer, it should be defaulted to a default value. So since the column was created earlier with a null value, all that was needed to be done is to update the data in the table to repair this error. Here’s what I did and it finally is running once again. update TABLENAME set IDELIVERY = 0;
f54ccc2c13f4dbf05aeee5ec2125deca58bdb9bbeca7fd7b1e