We’re currently using org.springframework.orm.hibernate3.LocalSessionFactoryBean to configure Hibernate in our app. It loads about fifty .hbm.xml mapping files, and of late, it appears that loading the DTD, http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd, is taking a much-longer-than-usual amount of time. Everything eventually works, but when one’s server takes over a minute to start up, it makes one grumpy. Here’s our doctype, in case we’re doing that incorrectly:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
Is there a way to turn validation on and off in, say, in the Spring-managed configuration of LocalSessionFactoryBean?
Have a look at this thread. It is a bit old, but the last entry said that you have to specifiy exactly that doctype name that is shipped with the hibernate jars.