I have Entity class with a helper method in it. like this..
@Entity
@Table(name = "MEMBER", schema = "APP_SCHEMA")
public class Member {
private String id;
private String externalMemberId;
@Id
@Column(name = "MEMBER_ID")
public String getId() {
return id;
}
@Column(name = "EXTERNAL_MEMBER_ID")
public String getExternalMemberId() {
return externalMemberId;
}
public String getAbc(){
return "abc";
}
}
I am getting exception when i start my jboss server while initializing
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: DataDB] Unable to build EntityManagerFactory
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
Caused by: java.lang.reflect.InvocationTargetException
Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property **abc** in class com.myapp.model.Member"}}
Why it is not allowing me to have helper/convenient method inside the entity class? Why it is expecting to map with property? I am using JBoss app server with Hibernate and JPA.