Joined: Fri Oct 31, 2003 7:37 pm Posts: 3 Location: Fort Collins, CO
|
I am getting the common cannot find /hibernate.cfg.xml when creating the session. I've read all the posts on this topic and tried putting the file in the root of the EAR and adding a Manifest entry to add Class-Path of "."....to no avail.
I've also tried to Explicitly load the XML document via:
Configuration cfg = new Configuration();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(this.getClass().getResourceAsStream("/hibernate.cfg.xml"));
_hibernateSF = cfg.configure(doc).buildSessionFactory();
This doesn't work either, and it brings up a couple of questions:
- first, why wouldn't this work (probably a stupid error)?
- second, why is the Configure.configure(org.dom4j.Document) method protected, when this one isn't?
Thanks in advance for any help.
Vince
|
|