-->
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.  [ 5 posts ] 
Author Message
 Post subject: hibernate.cfg.xml not found
PostPosted: Thu Aug 26, 2004 4:50 pm 
Newbie

Joined: Thu Mar 11, 2004 7:17 am
Posts: 14
Location: Goiania
Hi,

on my code (see below), I set a new Configuration object, and after a SessionFactory:

.
.
Configuration cfg = new Configuration();
cfg.addClass(eg.Cat);
SessionFactory sess = cfg.configure.buildSessionFactory();
.
.

but it's return me a error message:

WARNING: /hibernate.cfg.xml not found

As a reference guide, I put the related file in "WEB-INF/classes", but I also tried in "/" (root my context), togheter my .class and my .hbm.xml, but any success.

Where do I put (or reconfigure your location) this file ?
Anybody help me ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 4:57 pm 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
I assume you are using the quickstart as a guide for starting with Hibernate.

http://www.hibernate.org/hib_docs/refer ... start.html

According the to docs, WEB-INF/classes is the place where the hibernate.cfg.xml goes. Please double check that the file is there and the name of the file is correct.

_________________
Matt Veitas


Top
 Profile  
 
 Post subject: hibernate.cfg.xml not found
PostPosted: Thu Aug 26, 2004 5:11 pm 
Newbie

Joined: Thu Mar 11, 2004 7:17 am
Posts: 14
Location: Goiania
Thank you for your contact, Matt...

Really, I'm reading the reference guide and trying to adapt to my necessity.
I'm using Tomcat 4.1.24, JDK 1.5.0 and Hibernate v2.1 . My Ant 1.6.1 script generate my WAR file, putting hibernate.cfg.xml (your name is correct !!) in WEB-INF/classes.

Following the guide, it's everything right.


Top
 Profile  
 
 Post subject: hibernate.cfg.xml not found
PostPosted: Fri Aug 27, 2004 7:58 am 
Newbie

Joined: Thu Mar 11, 2004 7:17 am
Posts: 14
Location: Goiania
Anybody help me ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 27, 2004 9:41 am 
Newbie

Joined: Fri Aug 27, 2004 9:37 am
Posts: 2
Check the location of your 3rd party jars. Make sure Hibernate2.jar and company are in [yourWebApp]/WEB-INF/lib and not in [tomcat home]/shared/lib


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