aspose file tools*
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
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "FileNotFoundException with hibernate.cfg.xml" Watch "FileNotFoundException with hibernate.cfg.xml" New topic
Author

FileNotFoundException with hibernate.cfg.xml

olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
hi,

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


it always says:
Caused by: java.io.FileNotFoundException: /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
Author
Rancher

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:
/home/oli/Desktop/SpringStart

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: http://aspose.com/file-tools
 
subject: FileNotFoundException with hibernate.cfg.xml