rest - jersey restful + grizzly server + hibernate -


i can bring jersey + grizzly server up. problem occur during "sessionfactory sessionfactory = new configuration().configure().buildsessionfactory;" error says "severe: service exception: org.hibernate.hibernateexception: /hibernate.cfg.xml not found

.. know how make hibernate can access hibernate.cfg.xml location.

put in 'src/main/resources' directory of project. also, if you've specified "/hibernate.cfg.cml", try removing slash reads "hibernate.cfg.xml"

if doesn't work (no directory, classpath wrong, etc...) can hardcode working.

file f = new file("/wherever/the/file/is/hibernate.cfg.xml");  sessions = new configuration().configure(f).buildsessionfactory();  

then circle later , repay technical debt.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -