-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Deploying Hibernate in an EJB JAR...reading the config file
PostPosted: Fri Oct 31, 2003 7:43 pm 
Newbie

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2003 9:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
On which archive file did you try setting the manifest classpath entry? It should be the ejb jar, not the ear.

Also, which app server?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.