Hi,
Hibernate throws Exception: org.hibernate.PropertyNotFoundException: Could not find a getter for pky ... on my class. But i don't understand why, the mapping file and the source file are generated with the Hibernatetools for eclipse:
Hibernate version:
3.0
Mapping documents:
Code:
<class name="CodeValueImpl" table="DCA_CODEVALUE" schema="CODES">
<id name="pky" type="string">
<column name="PKY" length="100" />
<generator class="assigned" />
</id>
Java Source CodeCode:
public class CodeValueImpl {
private String pky;
public String getPky() {
return this.pky;
}
public void setPky(String pky) {
this.pky = pky;
}
}
Full stack trace of any exception that occurs:
org.hibernate.PropertyNotFoundException: Could not find a getter for pky in class us.aas.codes.administrator.dto.impl.CodeValueImpl
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:118)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
Name and version of the database you are using:
Oracle 9i