nathanmoon wrote:
ljpaff wrote:
... and I put in code for example "C:\...\hibernate-mapping-3.0.dtd" this not work on linux.
I'm not sure what you mean by this, but Hibernate reads the DTD as a resource from inside the Hibernate jar. As far as I know, you shouldn't need to do anything to get it to work without an internet connection.
Answer and further question:
The .hbm.xml files require (or used to require - clarification please) a clause like:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
or, if you don't want to use the internet you can place the physical DTDs in the server classpath with:
<!DOCTYPE hibernate-mapping SYSTEM "hibernate-mapping-2.0.dtd" >
And the obvious "further question":
How do I place the files in my WAR so that it does not rely on either the internet or the physical architecture of the machine?
(i.e.: with jBoss, in Windows you can put them in jboss/bin, but in Linux the DTDs have to be on the folder you execute "run" from - a pain if you are using /etc/init.d to start at boot - very bad place for DTDs).