首页 > 代码库 > ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

ssh项目启动报错:

    org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

一开始以为是数据库连接的事,后来发现是hibernate在实体对象映射数据库表的时候出的错

解决:

  查看hibernate.jar包里的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">

  将*.hbm.xml中的<!DOCTYPE ....>的标签换成上面的<!DOCTYPE ....>标签内容

  之后就可以正常启动项目了

ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect