This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes FileNotFoundException with hibernate.cfg.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "FileNotFoundException with hibernate.cfg.xml" Watch "FileNotFoundException with hibernate.cfg.xml" New topic

FileNotFoundException with hibernate.cfg.xml

olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148

i want to build a little spring 2.5 portlet which uses hibernate3

it always says:
Caused by: /hibernate.cfg.xml (No such file or directory)
i also tried it with replacing file with classpath, same problem
i also moved the file into my web-inf folder... same behavior
can anyone help me please?
David Newton

Joined: Sep 29, 2008
Posts: 12617

You don't say where your hibernate config file is.
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
currently i have it in:

the project is called SpringStart and the config is in /home/oli/Desktop/SpringStart/
should i try to move it to WEB-INF/classes? is this the classpath?
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
ok its working now... but how can i say that the file should be in SpringStart/conf when / is SpringStart/web/WEB-INF/classes
i'm using netbeans 6.7.1 which creates this structure
I agree. Here's the link:
subject: FileNotFoundException with hibernate.cfg.xml
Similar Threads
using annotation wiith Spring Please help
problem with .properties file
[Spring] Exception while creating the session factory
Hibernate SQL
Problem with running my first Hibernate App