Dariusz on Software

Methods and Tools

About This Site

Software development stuff

Archive

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.

hibernate_logo_a

Tags: hibernate.

Tags

Created by Chronicle v3.5