-->
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: Hibernate and struts together in separate projects
PostPosted: Wed Jul 07, 2004 1:32 pm 
Newbie

Joined: Wed Jul 07, 2004 1:25 pm
Posts: 3
Hi.
I am using WSAD 5. I have a java project to manage my databases using hibernate. I wanted to put a web interface to it, and coded it separately using struts.
I made a jar with the database (hibernate) app and put it in the /WEB-INF/lib directory of the struts app.
The only problem is that when I initialize hibernate, I get a HibernateException: /hibernate.cfg.xml not found. I have tried to put that file in many places without success. I don't want to hard code the name in the java code.
What is the default location, or what configuration parameters need to be adjusted for the struts app to be able to find that file?

thanks.

fid.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 07, 2004 3:07 pm 
Regular
Regular

Joined: Tue Sep 30, 2003 11:27 am
Posts: 60
Location: Columbus, OH, USA
It's looking for the Hibernate config file in the root of your classpath. Try putting the mapping file in the root of your web app's "Java Source" folder and see what happens. Note that you can also specify the (relative or absolute) location of this file upon creation of the session factory).

Scott


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.