I have around 75 .hbm.xml files in my project. Out of 75 files 4 files were using
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
and other 71 files are using
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
The project was working fine. But yesterday, when I restarted the server I found that it is not getting up and was throwing this exception.
org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 20;
Element type "hibernate-mapping" must be declared
I googled and found the solution that the 4 files is having the issue. I changed this code in those 4 .hbm.xml files
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
to this code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
and the server got up and running.
I got this issue on local, staging and live at the same time.
I am not able to find, why this happened because earlier it was working and why suddenly all machines stop working?
Is there any modification done by the hibernate team at their end?
I have to answer my senior about this issue but don't have an appropriate answer.
I am using java7, spring-core-3.0.0, spring-2.5 and spring-hibernate2 jars.