现在的位置: 首页 > 综合 > 正文

org.hibernate.PropertyAccessException:

2014年01月31日 ⁄ 综合 ⁄ 共 294字 ⁄ 字号 评论关闭
 在spring+hibernate出现这样的错误:

 org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) 

一般是因为在set属性时, 有null出现. 解决这个问题, 把此属性的类型从primitive类型改成wrapper类型.

例如: int  ----> Integer  ;   date ----> Date ;   boolean  ----->  Boolean  等等.....

抱歉!评论已关闭.