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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -