• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FileNotFoundException with hibernate.cfg.xml

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't say where your hibernate config file is.
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic