为了账号安全,请及时绑定邮箱和手机立即绑定

生成表结构出错,org.hibernate.MappingNotFoundException: resource: entity.Students.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:738) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2188) at org.hi

Students.hbm.xml文件存在;

配置文件hibernate.cfg.xml有加<mapping resource="Stdents.hbm.xml"/>

正在回答

1 回答

这个错误是生成表的映射文件没有找到引起的,相对于hibernate.cfg.xml文件来说,你写的<mapping resource="Stdents.hbm.xml"/>路径是找不到Students.hbm.xml文件的,建议使用绝对路径,改为<mapping resource="entity/Students.hbm.xmls"/>

1 回复 有任何疑惑可以回复我~
#1

lobigo

最后.xml后面多了个s,不好意思
2017-04-06 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

生成表结构出错,org.hibernate.MappingNotFoundException: resource: entity.Students.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:738) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2188) at org.hi

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号