Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileNotFoundException with hibernate.cfg.xml

 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't say where your hibernate config file is.
 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic