Quantcast
Viewing latest article 2
Browse Latest Browse All 7

org.hibernate.PropertyAccessException: exception setting property value with CGLIB

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.

Image may be NSFW.
Clik here to view.
hibernate_logo_a


Viewing latest article 2
Browse Latest Browse All 7

Trending Articles