org.hibernate.PropertyNotFoundException: Could not find a getter for id in class com.pb.dao.UserDao
来源:互联网 发布:淘宝网男童裤子 编辑:程序博客网 时间:2024/05/09 01:44
今天又bug了,登录主页后报
org.hibernate.PropertyNotFoundException: Could not find a getter for id in class com.pb.dao.UserDao
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:306)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:299)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:191)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:67)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:136)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:456)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:267)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at com.pb.Util.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:15)
at com.pb.dao.UserDaoImpl.login(UserDaoImpl.java:18)
at com.pb.action.UserAction.login(UserAction.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
等等一些列错误!
错误的发生可能有一下原因:
1:hibernate的配置文件错误,像我就是 !!
2:实体类中,get///set 方法不正确!原因是后来修改其属性名,未对其设置get--set方法!!
- org.hibernate.PropertyNotFoundException: Could not find a getter for id in class com.pb.dao.UserDao
- hibernate出现:org.hibernate.PropertyNotFoundException: Could not find a getter for id in class
- org.hibernate.PropertyNotFoundException Could not find a getter for id in class
- org.hibernate.PropertyNotFoundException: Could not find a getter for titlse in class com.po.Intro
- org.hibernate.PropertyNotFoundException: Could not find a getter for titlse in class com.po.Intro异常
- org.hibernate.PropertyNotFoundException: Could not find a getter for sMarathon in class com.honsto.
- 解决:ould not find a getter for porDate in class com.bc.bean.PortalSheet Caused by: org.hibernate.PropertyNotFoundException: Could
- org.hibernate.PropertyNotFoundException: Could not find a getter for empDeptId in class
- org.hibernate.PropertyNotFoundException: Could not find a getter for XXX
- " org.hibernate.PropertyNotFoundException:Could not find a getter for ..
- org.hibernate.PropertyNotFoundException: Could not find a getter for XXX
- 错误提示:Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for ID
- org.hibernate.PropertyNotFoundException: Could not find a getter
- Hibernate错误 Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for pnsame i
- Hibernate: Could not find a getter for **** in class
- Could not find a getter for name in class org.tarena.entity1.City
- Could not find a getter for userState in class com.zj.entity.Users
- could not find a getter for in class方法解决
- Android xliff和字符串资源
- 第十九题 用2个栈实现队列和用2个队列实现栈
- 利息计算<简单题>
- CentOS 6.5安装chrome浏览器
- How MongoDB’s Journaling Works
- org.hibernate.PropertyNotFoundException: Could not find a getter for id in class com.pb.dao.UserDao
- 又一个加盟骗局
- Block Object
- 【小白笔记】PHP学习之路 (28) --图像操作+画线
- 车牌识别系统 HY-LPR2
- Ubuntu下教你如何配置vim,详细。。
- 类的单继承和多实现的原因
- Oracle快速复制表 SqlServer select * into (不积跬步,无以至千里)
- Java中的循环语句:For