org.hibernate.PropertyAccessException: exception setting property value with CGLIB
Mon, 09 Nov 2009 11:00:15 +0000
The error
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of XYZ.setStatus().
Cause
Using primitive types (long) where NULL is possible or using wrong type (i.e. String if "char" is declared in HBM file).
Resolution
Change from primitive type (long) to wrappers (Long) or ensure correct type is defined in mapping files.