mercredi 24 août 2016

org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net

 org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
  hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
    org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
    hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net


This error happens only whenyou work  offline. hibernate try to read the DTD when parsing the config.

Hibernate can resolve the DTDs locally.

To solve this issue:

instead of:

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
use:

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"  

      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 



if the excpetion persist try to change


<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">


by this code:




!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">


the difference between them "www".