Kevin's Java Life

喝一杯咖啡,生活变得从容和清新
随笔 - 3, 文章 - 12, 评论 - 1, 引用 - 0
数据加载中……

Hibernate错误提示

1.net.sf.hibernate.QueryException: unexpected token 
       配置文件错误。hibernate.cfg.xml中未增加*.hbm.xml

2.net.sf.hibernate.MappingException: No persister for: com.your.classname

3.net.sf.hibernate.PropertyAccessException: exception setting property value with CGLIB setter of com.your.entity.classname.set***()
  
也是很常见的错误。引起此错误的原因很多,类型转换出错,NullPoinerExcption等。
  这里说一下NullPointerException,Hibernate有一个问题,对于java类型为基本类型的字段,如果数据库中该字段为null,则load数据时会触发NullPointerException,从而引起PropertyAccessException。

posted on 2005-12-28 17:05 Kevin 阅读(540) 评论(0)  编辑  收藏 所属分类: Hibernate


只有注册用户登录后才能发表评论。


网站导航: