最近启动tomcat的时候特别久,看日志mapping 实体类的时候会卡住,有时启动tomcat会出现org.dom4j.DocumentException: Connection timed out: connect Nested exception ,最后一个个实体文件对比,发现是某个文件引用到了错误的头文件:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"
" http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd ">
将其改为:<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
" http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">
重启tomcat即可.