Sep 25th, 2008, 09:20 AM
Hibernate Config (hibernate.hbm.xml) outside JAR
Hi Everyone, I have a java deskstop application developed in Netbeans 6, with multiple layers, In dataaccess layer I have the applicationcontext.xml and the hibernate.cfg.xml; the problem is that hibernate configuration is read inside the jar but I want to put this file outside the jar to change easily the database connection etc etc; I tried changing the property
but I still receive the FileNotFound exception; any suggestion to made this possible? Or is not normal put the hibernate file as an external resource for spring?
Salu2 desde Ecuador
Sep 26th, 2008, 04:07 AM
First of all use code tags.
Next, read spring refernece guide chapter for about resources.
If you do not want to have your file inside jar or inside folder which is on classpath you can not use "classpath" prefix.
You can use URL of file.
For details take a look at chapter 4
Tags for this Thread