Null value was assigned to a property of primitive type setter of
jpa程序,訪問報錯:
原因如下:
在pojo類GamePlayer中,某int類型的字段score,在數據庫中的數據為null。
解決辦法:
修改int為其包裝類型Integer。
org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.surfront.meepao.pojo.GamePlayer.score; nested exception is javax.persistence.PersistenceException:
原因如下:
在pojo類GamePlayer中,某int類型的字段score,在數據庫中的數據為null。
解決辦法:
修改int為其包裝類型Integer。
posted on 2011-10-10 10:12 小一敗涂地 閱讀(7621) 評論(1) 編輯 收藏 所屬分類: hibernate相關 、JPA,EJB相關