java - xxx.hbm.xml not found but it actually exists -


i error when run tomcat:

caused by: org.springframework.beans.factory.beancreationexception:
error creating bean name 'sessionfactory' defined in class path resource [beans.xml]: invocation of init method failed; nested exception is
org.hibernate.mappingnotfoundexception: resource:
com/itheima/elec/domain/electext.hbm.xml not found

but exists in project:

and in hibernate configuration below:

<session-factory>     ...     <mapping resource="com/itheima/elec/domain/electext.hbm.xml"/>     <mapping resource="com/itheima/elec/domain/eleccommonmsg.hbm.xml"/> </session-factory> 

i don't know issue is, can friend me?

please use @annotations classes inside domain folder,then no need use hbm.xml files. after in hibernate.cfg.xml file use ''


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -