Don't use old DTDs, read the Hibernate 3.x Migration Guide
使用Hibernate3進行開發,但是那些mapping的xml文件是用middlegen2.x.x生成的,所以在運行程序的時候報上面的錯誤
查下hibernate官方文檔http://www.hibernate.org/250.html#A21發現只需把DTD文件換個就行了
具體解決:
Change http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd to http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in the DOCTYPE