IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Eclipse Java Discussion :

[hibernate] probleme à la compilation sous eclipse


Sujet :

Eclipse Java

  1. #1
    Membre à l'essai
    Inscrit en
    Novembre 2005
    Messages
    19
    Détails du profil
    Informations forums :
    Inscription : Novembre 2005
    Messages : 19
    Points : 14
    Points
    14
    Par défaut [hibernate] probleme à la compilation sous eclipse
    Bonjour,
    j'ai un soucis lors de la compilation d'un projet avec hibernate
    voila les erreurs console que me renvoie eclipse

    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Environment <clinit>
    INFO: Hibernate 2.1.6
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Environment <clinit>
    INFO: hibernate.properties not found
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Environment <clinit>
    INFO: using CGLIB reflection optimizer
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Configuration configure
    INFO: configuring from resource: /hibernate.cfg.xml
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: Configuration resource: /hibernate.cfg.xml
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: hibernate/mapping/Chanson.hbm
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Binder bindRootClass
    INFO: Mapping class: traitement.Chanson -> chanson
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: hibernate/mapping/Distributeur.hbm
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Binder bindRootClass
    INFO: Mapping class: traitement.Distributeur -> distributeur
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: hibernate/mapping/Genre.hbm
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Binder bindRootClass
    INFO: Mapping class: traitement.Genre -> genre
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Binder bindCollection
    INFO: Mapping collection: traitement.Genre.oeuvre -> typer
    22 nov. 2005 16:04:03 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: hibernate/mapping/Langue.hbm
    22 nov. 2005 16:04:04 net.sf.hibernate.cfg.Binder bindRootClass
    INFO: Mapping class: traitement.Langue -> langue
    22 nov. 2005 16:04:04 net.sf.hibernate.cfg.Binder bindCollection
    INFO: Mapping collection: traitement.Langue.film -> version
    22 nov. 2005 16:04:04 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: hibernate/mapping/Oeuvre.hbm
    22 nov. 2005 16:04:04 net.sf.hibernate.util.XMLHelper$ErrorLogger error
    GRAVE: Error parsing XML: XML InputStream(38) Lattribut "{0}" nest pas déclaré pour lélément "{1}".
    22 nov. 2005 16:04:04 net.sf.hibernate.util.XMLHelper$ErrorLogger error
    GRAVE: Error parsing XML: XML InputStream(53) Lélément "{0}" naccepte pas "one-to-one" ici.
    22 nov. 2005 16:04:04 net.sf.hibernate.util.XMLHelper$ErrorLogger error
    GRAVE: Error parsing XML: XML InputStream(53) La valeur dattribut pour "{0}" est #REQUIRED.
    22 nov. 2005 16:04:04 net.sf.hibernate.util.XMLHelper$ErrorLogger error
    GRAVE: Error parsing XML: XML InputStream(54) Lélément "{0}" nécessite des éléments additionnels.
    java.lang.ExceptionInInitializerError
    at ihm.Start.main(Start.java:46)
    Caused by: java.lang.RuntimeException: Problème de configuration : Error reading resource: hibernate/mapping/Oeuvre.hbm
    at traitement.HibernateUtil.<clinit>(HibernateUtil.java:16)
    ... 1 more
    Caused by: net.sf.hibernate.MappingException: Error reading resource: hibernate/mapping/Oeuvre.hbm
    at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:339)
    at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1013)
    at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:969)
    at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897)
    at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:883)
    at traitement.HibernateUtil.<clinit>(HibernateUtil.java:14)
    ... 1 more
    Caused by: net.sf.hibernate.MappingException: invalid mapping
    at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:287)
    at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:336)
    ... 6 more
    Caused by: org.xml.sax.SAXParseException: Lattribut "{0}" nest pas déclaré pour lélément "{1}".
    at org.apache.crimson.parser.Parser2.error(Unknown Source)
    at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
    at org.apache.crimson.parser.Parser2.content(Unknown Source)
    at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
    at org.apache.crimson.parser.Parser2.content(Unknown Source)
    at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
    at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
    at org.apache.crimson.parser.Parser2.parse(Unknown Source)
    at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:339)
    at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:286)
    ... 7 more
    Exception in thread "main"


    voilà, quelqu'un peut-il m'aider??
    merci

  2. #2
    Membre à l'essai
    Inscrit en
    Novembre 2005
    Messages
    19
    Détails du profil
    Informations forums :
    Inscription : Novembre 2005
    Messages : 19
    Points : 14
    Points
    14
    Par défaut
    je vous donne aussi le mapping de ma classe oeuvre

    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

    <hibernate-mapping package="traitement">
    <class name="Oeuvre" table="oeuvre">
    <id
    column="idoeu"
    name="idOeu"
    type="java.lang.Short"
    >
    <generator class="vm" />
    </id>
    <property
    column="annee"
    length="10"
    name="annoeu"
    not-null="false"
    type="date"
    />
    <property
    column="titreoeu"
    length="60"
    name="titreOeu"
    not-null="false"
    type="string"
    />
    <property
    column="imaoeu"
    length="30"
    name="imaOeu"
    not-null="false"
    type="string"
    />
    <one-to-one
    class="traitement.Distributeur"
    name="distributeur"
    column="iddist"/>
    <set name="genre" table="typer">
    <key column="typoeu" />
    <many-to-many class="traitement.Genre"/>
    </set>
    <set name="nationnalite" table="nationnalite">
    <key column="natoeu" />
    <many-to-many class="traitement.Pays"/>
    </set>
    <set name="support" table="stocker">
    <key column="stockoeu" />
    <many-to-many class="traitement.Support"/>
    </set>
    <set name="emprunteur" table="emprunt">
    <key column="empoeu" />
    <one-to-one class="traitement.User"/>
    </set>

    <!-- MAPPING CLASSE FILLE -->
    <!-- mapping classe Film -->
    <subclass name="Film" >
    <property name="idFilm" column="idfilm" type="java.lang.Short"/>
    <property column="resfilm" name="resumeFilm" not-null="false"
    type="string" />
    <set name="acteur" table="jouer">
    <key column="jouefilm" />
    <many-to-many class="traitement.Personne"/>
    </set>
    <set name="realisateur" table="realiser">
    <key column="reafilm" />
    <many-to-many class="traitement.Personne"/>
    </set>
    <set name="langue" table="version">
    <key column="versfilm" />
    <many-to-many class="traitement.Langue"/>
    </set>
    <set name="st" table="soustitre">
    <key column="stfilm" />
    <many-to-many class="traitement.Langue"/>
    </set>
    </subclass>

    <!-- mapping classe Music -->
    <subclass name="Music" >
    <property name="idMusic" column="idmusic" type="java.lang.Short"/>
    <property column="nbmusic" length="3" name="nbChans"
    not-null="false"
    type="java.lang.Byte" />
    <set name="chanson" cascade="all-delete-orphan">
    <key column="idchans"/>
    <one-to-many class="traitement.Chanson" />
    </set>
    <set name="interprete" table="interpreter">
    <key column="intermusic" />
    <many-to-many class="traitement.Personne"/>
    </set>
    <set name="compositeur" table="composer">
    <key column="compmusic" />
    <many-to-many class="traitement.Personne"/>
    </set>
    </subclass>

    <!-- mapping classe Livre -->
    <subclass name="Livre" >
    <property name="idLivre" column="idlivre" type="java.lang.Short"/>
    <property column="reslivre" name="resumeLivre" not-null="false"
    type="string" />
    <set name="ecrivain" table="ecrire">
    <key column="ecrilivre" />
    <many-to-many class="traitement.Personne"/>
    </set>
    <many-to-one
    class="traitement.Langue"
    name="langue"
    column="codlang"/>
    </subclass>

    </class>
    </hibernate-mapping>

    je pense que cela vient du mapping par classe fille, j'intègre lorsque je déclare les sub-class des liens vers d'autres classes qui ne sont pas en corélation directe avec la c lasse Oeuvre.

    voila, merci pour vos réponses

Discussions similaires

  1. [débutant] Compilation sous eclipse
    Par zaoueche dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 05/03/2006, 12h10
  2. Probleme de compilation sous Dev-Cpp
    Par Guldin dans le forum Dev-C++
    Réponses: 2
    Dernier message: 09/02/2006, 08h34
  3. Problème de compilation sous kdevelop3
    Par Lord Van dans le forum Linux
    Réponses: 8
    Dernier message: 24/12/2005, 17h41
  4. [Eclipse 3.1]compiler sous eclipse 3.1
    Par tarik75 dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 25/07/2005, 13h01
  5. [TP]Probleme de compilation sous TP7
    Par yffick dans le forum Turbo Pascal
    Réponses: 7
    Dernier message: 18/12/2003, 20h32

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo