I'm getting the following exception:
Caused by: Exception [EclipseLink-7151] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The type [class commons.Gender] for the attribute [gender] on the entity class [class persistence.PatientEntity] is not a valid type for an enumerated mapping. The attribute must be defined as a Java enum.
But I can't figure out why since I assume my classes to be O.K.:
public class PatientEntity implements Lockable<Long>, Identifiable<Long> {
...
private Gender gender;
@Enumerated(EnumType.STRING)
@Column(name = "gender")
public Gender getGender() {
return this.gender;
}
public void setGender(Gender gender) {
this.gender = gender;
}
...
}
public enum Gender implements ExtendedDisplayable {
NONE,
MALE,
FEMALE;
...
}
Btw. The excpetion appears at application startup. But the application is running without any problems. I can inssert and select patients from the database.
[Updated on: Tue, 23 October 2012 13:41]
Report message to a moderator