such type of exception may occur in hibernate when the configuration file - hibernate.cfg.xml can not be located by the hibernate system while developing project in Eclipse IDE. it is because if you have not given the path for the hibernate.cfg.xml file properly ..
if in your eclipse project if you are keeping your files in different packages then make sure you gave the path of the packages..
to solve the above problem you need to follow the below steps
Procedure number 1:
1)you need the give the path of the package in your mapping file(say here employee.hbm.xml) for the name attribute of <class name="<here>" > tag ..
2)and also you need to provide the full package path in the <mapping resource="<here> "> tag of the hibernate.cfg.xml file
again while creating the Configuration Object also you need to provide the full package name in the configure(< here> ) method
so by above process you make your hibernate system know from where to locate the hibernate.cfg.xml file
Procedure number 2
if in your eclipse project if you are keeping your files in different packages then make sure you gave the path of the packages..
to solve the above problem you need to follow the below steps
Procedure number 1:
1)you need the give the path of the package in your mapping file(say here employee.hbm.xml) for the name attribute of <class name="<here>" > tag ..
2)and also you need to provide the full package path in the <mapping resource="<here> "> tag of the hibernate.cfg.xml file
again while creating the Configuration Object also you need to provide the full package name in the configure(< here> ) method
so by above process you make your hibernate system know from where to locate the hibernate.cfg.xml file
Procedure number 2
instead of procedure number 1 you can simply place you configuration file and mapping file inside the classes folder of WEB-INF
simply copy and paste the hibernate.cfg.xml and hbm.xml(here employee.hbm.xml inside the classes folder of WEB-INF folder