on 04-10-2007 10:46 AM
Hi All,
I want to use hibernate instead of entity bean in my EJB project,
I have tried and succeded the hibernate example with servlet .
But with EJB project i got exception hibernate.cfg.xml is not found ,
In the Web Project i placed the hibernate.cfg.xml file in WEB-INF-->classes.
my doubt is where to place the hibernate.cfg.xml file in the EJB Project.and how to configure that file.
Any help is appreciated.
Thanks & Regards
Srinivas
Hi,
I succeed in configuration of Hibernate. My configuration file is in dist/PORTAL-INF/classes.
Julien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this document will be helpful http://wiki.java.net/bin/view/Projects/ConfigureHibernate
It suggest to have the following structure of ejb jar:
<i>META-INF/MANIFEST.MF
META-INF/ejb-jar.xml
META-INF/sun-ejb-jar.xml
<application classes>
hibernate2.jar
Customer.hbm.xml
hibernate.cfg.xml
dom4j-1.4.jar
jta.jar
log4j-1.2.8.jar
cglib-full-2.0.2.jar
odmg-3.0.jar
ehcache-0.9.jar
commons-collections-2.1.1.jar
commons-dbcp-1.2.1.jar
commons-lang-1.0.1.jar
commons-logging-1.0.4.jar
commons-pool-1.2.jar</i>
Your EJB project doesn't have acces to your WAR classpath.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.