-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate.cfg.xml Location in WSAD
PostPosted: Tue Feb 15, 2005 8:22 am 
Newbie

Joined: Mon Jan 31, 2005 11:33 am
Posts: 8
Location: Netherlands
Hi Guys,
I came across this issue from a colleague of mine ! Well he created an EAR project with only a WAR project no EJB's. He is trying to follow the approach of jsp -> servlet (hibernat -> DB).

As you can see the java files and xml would now be under WAR project. I wanna know were to put hibernate.cfg.xml, cause after trying different locations I came back fruitless..

One last thing: I had to add hibernat-jars on websphere server (6.0) classpath as adding them to EAR and refering them in WAR doesn't work !!
Adding to Jar Dependency - work via ejb or ejb client project (which in this case doesn't exists)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 8:40 am 
Newbie

Joined: Mon Jan 31, 2005 11:33 am
Posts: 8
Location: Netherlands
Hi,
If anyone has a similar problem, I was able to get in working with the introduction of a java project (containing all hibernate classes, xml files) and add this project as "jar" via EAR to the WAR in MANIFEST.MF (jar dependecy edtior).

This was a work around so if anyone solves the original problem please do let me know too.

It seems to me the classloader of WAR module is different from the rest i.e classloader for EJB module, Client module & EAR module. I can also safely say that inside WSAD every module uses a seperate classloader.

Anand


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 16, 2005 11:43 pm 
Newbie

Joined: Mon Feb 14, 2005 12:14 am
Posts: 14
Location: Boston, USA
You can add the hibernate related jars in the WEB-INF/lib directory. And the Hibernate.cfg.xml file should be in class path. So you can put it directly under WEB-INF/classes of you Web Module (WAR).

OR

You can create a lib directory under your EAR. And in the web module(WAR) class path just lib/xxxxx.jar. This will also work.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 10:03 pm 
Newbie

Joined: Wed Nov 02, 2005 5:33 am
Posts: 12
Did you deploy your Hibernate app onto WAS v5.1.2? If yes, could you spare time to share your experience with the community? the deadline for my project is comming... :( thank you!

thanh.hoc@gmail.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.