Tag Archives | hibernate exceptions

Collection has neither generic type or OneToMany.targetEntity() defined

Exception “org.hibernate.AnnotationException: Collection has neither generic type or OneToMany.targetEntity() defined:“ I am getting following Exception Solution “Hibernate must know what type of object is in a Set, so add custom parametrized class in Set as shown below.“ private Set employees; //Exceptionprivate Set<Employee> employees; //Works Fine

Continue Reading ... Comments { 1 }

Null value was assigned to a property of primitive type setter of

Exception “org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of“ I am getting following Exception Solution “Use the non-primitive wrapper types (eg Integer instead of int)“

Continue Reading ... Comments { 0 }