The following error message appears
java.lang.IllegalArgumentException:
The attribute [eMailStatus]
from the managed type [EntityTypeImpl@902966747:PersonJpaDao
[ javaType: class com.bitplan.smartCRM.jpa.PersonJpaDao descriptor:
RelationalDescriptor(com.bitplan.smartCRM.jpa.PersonJpaDao --> [DatabaseTable(Person)]),
mappings: 46]]
is not present.
at
org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.getAttribute(ManagedTypeImpl.java:147)
while the annotation and getters and setters are present:
/**
* getter for xsd:string/String EMailStatus
* @return eMailStatus
*/
@Column(name="eMailStatus")
public String getEMailStatus() {
return getPersonImpl().getEMailStatus();
}
/**
* setter for xsd:string/String EMailStatus
* @param peMailStatus - new value for EMailStatus
*/
public void setEMailStatus(String peMailStatus) {
getPersonImpl().setEMailStatus(peMailStatus);
}
My assumption is that the naming of the field is relevant: if the first letter of the field is lowerCase and the second is uppercase than the problem seems to show. Propertynames like:
- SSN
- EMailStatus
are o.k but e.g.
- eMailStatus
- xStatus
are not.
What could be going on here and how could I debug this to find out how to fix this?
I am guessing that the JavaBean spec capitalization rules are the culprit here as outlined in a comment of Where is the JavaBean property naming convention defined?