-->
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.  [ 8 posts ] 
Author Message
 Post subject: Configuration().configure("hibernate.cf")) - doesn
PostPosted: Mon Jan 12, 2004 1:06 pm 
Newbie

Joined: Fri Dec 05, 2003 12:54 pm
Posts: 6
I keep getting "could not find file: hibernate.cfg.xml" exception when explicitly specifying configuration file name. I also get this error when I specify it as "new java.io.File("hibernate.cfg.xml")".
However when I don't specify any parameter everything works fine.
Config file is in my classpass.
Has anyone seen this error ? Am I missing something else ?
I am running Hibernate 2.1

Thanks !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 1:15 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Try "/hibernate.cfg.xml".

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 2:03 pm 
Newbie

Joined: Fri Dec 05, 2003 12:54 pm
Posts: 6
I've tried "/hibernate.cfg.xml" as well, still work.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 2:05 pm 
Newbie

Joined: Fri Dec 05, 2003 12:54 pm
Posts: 6
I mean - still won't work.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 9:14 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Tomcat ?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2004 10:42 am 
Newbie

Joined: Fri Dec 05, 2003 12:54 pm
Posts: 6
Nope, JBoss 3.2 with Tomcat but also it happends in WebSphere 4 Test Env (WSAD)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2004 10:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Quote:
I've tried "/hibernate.cfg.xml" as well, still wont work.

Quote:
However when I don't specify any parameter everything works fine.

I can hardly believe that. Look at the code of Configuration.configure:

Code:
   public Configuration configure() throws HibernateException {
      configure("/hibernate.cfg.xml");
      return this;
   }


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2004 2:27 pm 
Newbie

Joined: Fri Dec 05, 2003 12:54 pm
Posts: 6
It works now. I was actually specifying it in new File object
Thanks !


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