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". 


2 commentaires:

  1. The problem is resolved if you change also in the mapping file the following:
    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

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

    RépondreSupprimer
    Réponses
    1. That's right mohamed if you work with mapping ressource not with annoted classes.

      Supprimer

CANADA JOB