org.hibernate.InvalidMappingException

Exceptioninthread"main"org.hibernate.InvalidMappingException:Couldnotparsemappingdocu... Exception in thread "main" org.hibernate.InvalidMappingException: Could not parse mapping document from resource edu/njcc/hibernate/User.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:523)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1352)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1338)
at edu.njcc.hibernate.Client.main(Client.java:13)
Caused by: org.hibernate.PropertyNotFoundException: field [createTime] not found on edu.njcc.hibernate.User
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:112)
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:104)
at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:127)
at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:83)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:71)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2164)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2141)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2031)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
at org.hibernate.cfg.Configuration.add(Configuration.java:424)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)
展开
 我来答
toto71229
2011-09-23 · TA获得超过808个赞
知道小有建树答主
回答量:513
采纳率:0%
帮助的人:464万
展开全部
一般报这个错 都是你那个配置文件有错误~
field [createTime] not found on edu.njcc.hibernate.User
这个属性有没有的?
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式