嗨,我使用Spring-Hibernate與HibernateDaoSupport
,其中我的Dao延伸了HibernateDaoSupport
。當我從表中獲取數據時,出現以下錯誤:當我在同一張表上提交數據時,它運行成功。可以任何人提供您的想法嗎?org.springframework.orm.hibernate3.HibernateSystemException:...爲什麼它是?
錯誤:
org.springframework.orm.hibernate3.HibernateSystemException: Null value was assigned to a property of primitive type setter of com.mypack.table.TblValues.minval; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.mypack.table.TblValues.minval
注:minval
是在表TblValues
列的一個,以及i分配空值。
碼錶POJO吸氣劑& setter屬性:
@Column(name="minVal",nullable=true)
public byte getMinVal() {
return this.minVal;
}
public void setMinVal(byte minVal) {
this.minVal = minVal;
}
我自己並沒有採取字節數據類型,我使用自動生成的NetBeans中的逆向工程 – Naresh 2010-12-22 10:42:40