I have hibernate.cfg.xml in web-inf.
I initialise hibernate with:
Configuration cfg = new Configuration();
cfg.configure(realPath + "WEB-INF\\hibernate.cfg.xml");
SessionFactory sessions = cfg.buildSessionFactory();
Im still getting this error:
[2005-04-23 22:18:06.296] initializing application
http://localhost:9999/jspforums
net.sf.hibernate.HibernateException: C:\Documents and Settings\Dave\My Documents\WebSites\MyWeb\web\webapps\jspforums\WEB-INF\hibernate.cfg.xml not found
at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:849)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:873)
at uk.co.davidjc.jspforums.init.ServletContextInit.contextInitialized(ServletContextInit.java:43)
Even though the file exists at that location, it is saying it cant find it??
Ive tried using the classpath method of loading too, and i get the same error.
Im using Resin 2.1.12.
Thanks
Dave