<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hiber
In the above example, the server will go download the DTD from the URL above.
The solution for this is to download a local copy and specify it in the XML file. There is no need to change "PUBLIC" to "SYSTEM", just change the location.
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"dtd/hibernate-configuration-3.0.dtd"
In this example, the parser (Xerces) searched the relative path according to the directory where the Tomcat server was launched e.g. (/opt/tomcat/bin/), so all I needed to do was to put a copy of the DTD file in /opt/tomcat/bin/dtd. It's not an ideal solution. I would have preferred if the parser was smart enough to look in the classpath first, but it didn't, so I'm stuck with this solution.
No comments:
Post a Comment