org.hibernate.PropertyAccessException: could not set a field value by reflection setter

The reason for the exception is ,

i used primitive long datatype for an database column which can take null, so my primitive long cannot store null value.

Solution
Changed it to Long .

problem solved.