Give a path regarding your project.
Create a resources folder in src and place your configuration file there.
configuration.configure("/resources/hibernate.cfg.xml");
And if you check your code
Configuration configuration = new Configuration().configure( "C:\\Users\\Nikolay_Tkachev\\workspace\\hiberTest\\src\\logic\\hibernate.cfg.xml"); return new Configuration().configure().buildSessionFactory();
In two lines, you create two configuration objects.
This should work (not verified) if you write
Configuration configuration = new Configuration().configure( "C:\\Users\\Nikolay_Tkachev\\workspace\\hiberTest\\src\\logic\\hibernate.cfg.xml"); return configuration.buildSessionFactory();
But it failed after deploying to the server, since you are using the system path than the relative path of the project.
κ±α΄Κα΄κ±Κ α΄α΄α΄α΄ Sep 11 '13 at 8:54 on 2013-09-11 08:54
source share