I am getting the following exception when i try to run my application
Initial SessionFactory creation failed.org.hibernate.PropertyNotFoundException:
Could not find a getter for countyId in class com.mavent.model.testLimit
mapping:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Oct 17, 2008 3:48:21 PM by Hibernate Tools 3.2.0.b9 -->
<hibernate-mapping>
<class name="com.test.model.testLimit" table="TEST_LIMIT" >
<id name="id" type="long">
<column name="ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">TEST_ID_SEQ</param>
</generator>
</id>
<many-to-one name="county" class="com.test.model.County" fetch="select">
<column name="COUNTY_ID" precision="22" scale="0" not-null="true" />
</many-to-one>
<property name="limitTransactionDate" type="timestamp">
<column name="LIMIT_TRANSACTION_DATE" length="7" not-null="true" />
</property>
<property name="limitType" type="string">
<column name="LIMIT_TYPE" length="20" not-null="true" />
</property>
<property name="unitCount" type="big_decimal">
<column name="UNIT_COUNT" precision="22" scale="0" not-null="true" />
</property>
<property name="limitAmount" type="string">
<column name="LIMIT_AMOUNT" length="240" />
</property>
</class>
</hibernate-mapping>
pojo
/**
*
* Copyright (c) 2007, Mavent Inc.
* All Rights Reserved.
*
*/
package com.mavent.model;
// Generated by Hibernate Tools 3.2.0.b9
import java.math.BigDecimal;
import java.util.Date;
/**
* TESTLimit generated by hbm2java
*/
public class TESTLimit implements java.io.Serializable {
//Fields
private long id;
private County county;
private Date limitTransactionDate;
private String limitType;
private BigDecimal unitCount;
private String limitAmount;
// Constructors
/** default constructor */
public TESTLimit() {
}
/** minimal constructor */
public TESTLimit(County county, Date limitTransactionDate, String limitType, BigDecimal unitCount) {
this.county = county;
this.limitTransactionDate = limitTransactionDate;
this.limitType = limitType;
this.unitCount = unitCount;
}
/** full constructor */
public TESTLimit(County county, Date limitTransactionDate, String limitType, BigDecimal unitCount, String limitAmount) {
this.county = county;
this.limitTransactionDate = limitTransactionDate;
this.limitType = limitType;
this.unitCount = unitCount;
this.limitAmount = limitAmount;
}
// Property accessors
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
public County getCounty() {
return this.county;
}
public void setCounty(County county) {
this.county = county;
}
public Date getLimitTransactionDate() {
return this.limitTransactionDate;
}
public void setLimitTransactionDate(Date limitTransactionDate) {
this.limitTransactionDate = limitTransactionDate;
}
public String getLimitType() {
return this.limitType;
}
public void setLimitType(String limitType) {
this.limitType = limitType;
}
public BigDecimal getUnitCount() {
return this.unitCount;
}
public void setUnitCount(BigDecimal unitCount) {
this.unitCount = unitCount;
}
public String getLimitAmount() {
return this.limitAmount;
}
public void setLimitAmount(String limitAmount) {
this.limitAmount = limitAmount;
}
}
|