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

Hibernate Java Discussion :

probleme avec mon mapping


Sujet :

Hibernate Java

  1. #1
    Membre régulier
    Inscrit en
    Mai 2002
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Mai 2002
    Messages : 219
    Points : 74
    Points
    74
    Par défaut probleme avec mon mapping
    bonjour tout le monde j utilise hibernate 2
    avec le plug-ing hibernatesynch.
    voici mon message d erreur
    je comprends pas ce qui se passe
    d autant pour que ma classe et mon fichier mapping
    sont genere par le plug in.
    Est ce qun il y a une personne qui peut m aide svp merci
    d avance

    18:38:22,986 ERROR XMLHelper:48 - Error parsing XML: XML InputStream(83) Le contenu du type d'?l?ment "class" doit correspondre ? "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))".

    et mon fichier mapping


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

    <hibernate-mapping >
    <class name="ca.croixbleue.qc.model.base.BaseAvinfoge" table="AVINFOGE">

    >

    <property
    name="IgIdDoubleAss"
    column="IG_ID_DOUBLE_ASS"
    type="string"
    not-null="false"
    length="1"
    />
    <property
    name="IgDtEvenement"
    column="IG_DT_EVENEMENT"
    type="integer"
    not-null="false"
    length="8"
    />
    <property
    name="IgGroupeClient"
    column="IG_GROUPE_CLIENT"
    type="string"
    not-null="false"
    length="8"
    />
    <property
    name="IgNoDossier"
    column="IG_NO_DOSSIER"
    type="string"
    not-null="false"
    length="6"
    />
    <property
    name="IgNoCertificatSam"
    column="IG_NO_CERTIFICAT_SAM"
    type="string"
    not-null="false"
    length="20"
    />
    <property
    name="IgNoCertificat"
    column="IG_NO_CERTIFICAT"
    type="string"
    not-null="false"
    length="10"
    />
    <property
    name="IgNoGroupe"
    column="IG_NO_GROUPE"
    type="string"
    not-null="false"
    length="6"
    />
    <property
    name="IgIdUser"
    column="IG_ID_USER"
    type="string"
    not-null="false"
    length="4"
    />
    <property
    name="IgDtModif"
    column="IG_DT_MODIF"
    type="integer"
    not-null="false"
    length="8"
    />
    <property
    name="IgIdAccident"
    column="IG_ID_ACCIDENT"
    type="string"
    not-null="false"
    length="1"
    />


    </class>
    </hibernate-mapping>




    ma classe

    package ca.croixbleue.qc.model.base;

    import java.io.Serializable;


    /**
    * This class has been automatically generated by Hibernate Synchronizer.
    * For more information or documentation, visit The Hibernate Synchronizer page
    * at http://www.binamics.com/hibernatesync or contact Joe Hudson at joe@binamics.com.
    *
    * This is an object that contains data related to the AVINFOGE table.
    * Do not modify this class because it will be overwritten if the configuration file
    * related to this class is modified.
    *
    * @hibernate.class
    * table="AVINFOGE"
    */


    public abstract class BaseAvinfoge implements Serializable {

    public static String PROP_IG_ID_DOUBLE_ASS = "IgIdDoubleAss";
    public static String PROP_IG_NO_DOSSIER = "IgNoDossier";
    public static String PROP_IG_GROUPE_CLIENT = "IgGroupeClient";
    public static String PROP_IG_NO_CERTIFICAT_SAM = "IgNoCertificatSam";
    public static String PROP_IG_DT_EVENEMENT = "IgDtEvenement";
    public static String PROP_IG_ID_USER = "IgIdUser";
    public static String PROP_IG_ID_ACCIDENT = "IgIdAccident";
    public static String PROP_IG_NO_CERTIFICAT = "IgNoCertificat";
    public static String PROP_IG_DT_MODIF = "IgDtModif";
    public static String PROP_IG_NO_GROUPE = "IgNoGroupe";


    // fields
    private java.lang.String _igIdDoubleAss;
    private java.lang.Integer _igDtEvenement;
    private java.lang.String _igGroupeClient;
    private java.lang.String _igNoDossier;
    private java.lang.String _igNoCertificatSam;
    private java.lang.String _igNoCertificat;
    private java.lang.String _igNoGroupe;
    private java.lang.String _igIdUser;
    private java.lang.Integer _igDtModif;
    private java.lang.String _igIdAccident;


    // constructors
    public BaseAvinfoge () {
    initialize();
    }

    protected void initialize () {}




    /**
    * Return the value associated with the column: IG_ID_DOUBLE_ASS
    */
    public java.lang.String getIgIdDoubleAss () {
    return _igIdDoubleAss;
    }

    /**
    * Set the value related to the column: IG_ID_DOUBLE_ASS
    * @param _igIdDoubleAss the IG_ID_DOUBLE_ASS value
    */
    public void setIgIdDoubleAss (java.lang.String _igIdDoubleAss) {
    this._igIdDoubleAss = _igIdDoubleAss;
    }


    /**
    * Return the value associated with the column: IG_DT_EVENEMENT
    */
    public java.lang.Integer getIgDtEvenement () {
    return _igDtEvenement;
    }

    /**
    * Set the value related to the column: IG_DT_EVENEMENT
    * @param _igDtEvenement the IG_DT_EVENEMENT value
    */
    public void setIgDtEvenement (java.lang.Integer _igDtEvenement) {
    this._igDtEvenement = _igDtEvenement;
    }


    /**
    * Return the value associated with the column: IG_GROUPE_CLIENT
    */
    public java.lang.String getIgGroupeClient () {
    return _igGroupeClient;
    }

    /**
    * Set the value related to the column: IG_GROUPE_CLIENT
    * @param _igGroupeClient the IG_GROUPE_CLIENT value
    */
    public void setIgGroupeClient (java.lang.String _igGroupeClient) {
    this._igGroupeClient = _igGroupeClient;
    }


    /**
    * Return the value associated with the column: IG_NO_DOSSIER
    */
    public java.lang.String getIgNoDossier () {
    return _igNoDossier;
    }

    /**
    * Set the value related to the column: IG_NO_DOSSIER
    * @param _igNoDossier the IG_NO_DOSSIER value
    */
    public void setIgNoDossier (java.lang.String _igNoDossier) {
    this._igNoDossier = _igNoDossier;
    }


    /**
    * Return the value associated with the column: IG_NO_CERTIFICAT_SAM
    */
    public java.lang.String getIgNoCertificatSam () {
    return _igNoCertificatSam;
    }

    /**
    * Set the value related to the column: IG_NO_CERTIFICAT_SAM
    * @param _igNoCertificatSam the IG_NO_CERTIFICAT_SAM value
    */
    public void setIgNoCertificatSam (java.lang.String _igNoCertificatSam) {
    this._igNoCertificatSam = _igNoCertificatSam;
    }


    /**
    * Return the value associated with the column: IG_NO_CERTIFICAT
    */
    public java.lang.String getIgNoCertificat () {
    return _igNoCertificat;
    }

    /**
    * Set the value related to the column: IG_NO_CERTIFICAT
    * @param _igNoCertificat the IG_NO_CERTIFICAT value
    */
    public void setIgNoCertificat (java.lang.String _igNoCertificat) {
    this._igNoCertificat = _igNoCertificat;
    }


    /**
    * Return the value associated with the column: IG_NO_GROUPE
    */
    public java.lang.String getIgNoGroupe () {
    return _igNoGroupe;
    }

    /**
    * Set the value related to the column: IG_NO_GROUPE
    * @param _igNoGroupe the IG_NO_GROUPE value
    */
    public void setIgNoGroupe (java.lang.String _igNoGroupe) {
    this._igNoGroupe = _igNoGroupe;
    }


    /**
    * Return the value associated with the column: IG_ID_USER
    */
    public java.lang.String getIgIdUser () {
    return _igIdUser;
    }

    /**
    * Set the value related to the column: IG_ID_USER
    * @param _igIdUser the IG_ID_USER value
    */
    public void setIgIdUser (java.lang.String _igIdUser) {
    this._igIdUser = _igIdUser;
    }


    /**
    * Return the value associated with the column: IG_DT_MODIF
    */
    public java.lang.Integer getIgDtModif () {
    return _igDtModif;
    }

    /**
    * Set the value related to the column: IG_DT_MODIF
    * @param _igDtModif the IG_DT_MODIF value
    */
    public void setIgDtModif (java.lang.Integer _igDtModif) {
    this._igDtModif = _igDtModif;
    }


    /**
    * Return the value associated with the column: IG_ID_ACCIDENT
    */
    public java.lang.String getIgIdAccident () {
    return _igIdAccident;
    }

    /**
    * Set the value related to the column: IG_ID_ACCIDENT
    * @param _igIdAccident the IG_ID_ACCIDENT value
    */
    public void setIgIdAccident (java.lang.String _igIdAccident) {
    this._igIdAccident = _igIdAccident;
    }






    public String toString () {
    return super.toString();
    }

    }

  2. #2
    Membre régulier
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Janvier 2008
    Messages
    94
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Janvier 2008
    Messages : 94
    Points : 117
    Points
    117
    Par défaut

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2009
    Messages
    92
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2009
    Messages : 92
    Points : 108
    Points
    108
    Par défaut
    il manque l'identifiant dans le mapping de la classe BaseAvinfoge

  4. #4
    Membre régulier
    Inscrit en
    Mai 2002
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Mai 2002
    Messages : 219
    Points : 74
    Points
    74
    Par défaut
    ok donc j ai ajoute
    et j ai toujours la meme erreur.

    Je comprends plus rien.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    	"-//Hibernate/Hibernate Mapping DTD//EN"
    	"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
    
    <hibernate-mapping >
    	<class name="ca.croixbleue.qc.model.base.BaseAvinfoge" table="AVINFOGE">
    	
    	>
    
    <composite-id>
            <key-property name="IgGroupeClient"/>
            <key-property name="IgNoCertificatSam"/>
            <key-property name="IgDtEvenement"/>
            <key-property name="IgNoDossier"/>
    </composite-id>
    
    	
    		<property
    			name="IgIdDoubleAss"
    			column="IG_ID_DOUBLE_ASS"
    			type="string"
    			not-null="false"
    			length="1"
    		/>
    		<property
    			name="IgDtEvenement"
    			column="IG_DT_EVENEMENT"
    			type="integer"
    			not-null="false"
    			length="8"
    		/>
    		<property
    			name="IgGroupeClient"
    			column="IG_GROUPE_CLIENT"
    			type="string"
    			not-null="false"
    			length="8"
    		/>
    		<property
    			name="IgNoDossier"
    			column="IG_NO_DOSSIER"
    			type="string"
    			not-null="false"
    			length="6"
    		/>
    		<property
    			name="IgNoCertificatSam"
    			column="IG_NO_CERTIFICAT_SAM"
    			type="string"
    			not-null="false"
    			length="20"
    		/>
    		<property
    			name="IgNoCertificat"
    			column="IG_NO_CERTIFICAT"
    			type="string"
    			not-null="false"
    			length="10"
    		/>
    		<property
    			name="IgNoGroupe"
    			column="IG_NO_GROUPE"
    			type="string"
    			not-null="false"
    			length="6"
    		/>
    		<property
    			name="IgIdUser"
    			column="IG_ID_USER"
    			type="string"
    			not-null="false"
    			length="4"
    		/>
    		<property
    			name="IgDtModif"
    			column="IG_DT_MODIF"
    			type="integer"
    			not-null="false"
    			length="8"
    		/>
    		<property
    			name="IgIdAccident"
    			column="IG_ID_ACCIDENT"
    			type="string"
    			not-null="false"
    			length="1"
    		/>
    
    
    	</class>
    </hibernate-mapping>

  5. #5
    Membre régulier
    Inscrit en
    Mai 2002
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Mai 2002
    Messages : 219
    Points : 74
    Points
    74
    Par défaut RESOLU
    c est bon j ai resolue mon probleme
    avec le mapping

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
     
     
    <?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="ca.croixbleue.qc.model.base">
    	<class 
    		name="BaseAvinfoge"
    		table="AVINFOGE"
    	>
     
     
    	 <composite-id class="ca.croixbleue.qc.model.base.AvinfogeId">
     
            <key-property name="IgGroupeClient"/>
            <key-property name="IgNoCertificatSam"/>
            <key-property name="IgDtEvenement"/>
            <key-property name="IgNoDossier"/>
          </composite-id>
     
    		<property
    			name="IgIdDoubleAss"
    			column="IG_ID_DOUBLE_ASS"
    			type="string"
    			not-null="false"
    			length="1"
    		/>
    		<property
    			name="IgDtEvenement"
    			column="IG_DT_EVENEMENT"
    			type="integer"
    			not-null="false"
    			length="8"
    		/>
    		<property
    			name="IgGroupeClient"
    			column="IG_GROUPE_CLIENT"
    			type="string"
    			not-null="false"
    			length="8"
    		/>
    		<property
    			name="IgNoDossier"
    			column="IG_NO_DOSSIER"
    			type="string"
    			not-null="false"
    			length="6"
    		/>
    		<property
    			name="IgNoCertificatSam"
    			column="IG_NO_CERTIFICAT_SAM"
    			type="string"
    			not-null="false"
    			length="20"
    		/>
    		<property
    			name="IgNoCertificat"
    			column="IG_NO_CERTIFICAT"
    			type="string"
    			not-null="false"
    			length="10"
    		/>
    		<property
    			name="IgNoGroupe"
    			column="IG_NO_GROUPE"
    			type="string"
    			not-null="false"
    			length="6"
    		/>
    		<property
    			name="IgIdUser"
    			column="IG_ID_USER"
    			type="string"
    			not-null="false"
    			length="4"
    		/>
    		<property
    			name="IgDtModif"
    			column="IG_DT_MODIF"
    			type="integer"
    			not-null="false"
    			length="8"
    		/>
    		<property
    			name="IgIdAccident"
    			column="IG_ID_ACCIDENT"
    			type="string"
    			not-null="false"
    			length="1"
    		/>
     
     
    </class>
    </hibernate-mapping>

    en creant une nouvelle classe AvinfogeId
    et surchargeant les methodes equals et hascode

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. probleme avec mon OS
    Par quaresma dans le forum Windows XP
    Réponses: 2
    Dernier message: 11/01/2006, 06h50
  2. Probleme avec mon algorithme de tri
    Par kaygee dans le forum Langage
    Réponses: 6
    Dernier message: 09/01/2006, 21h23
  3. Probleme avec mon professeur
    Par Hamza dans le forum Algorithmes et structures de données
    Réponses: 20
    Dernier message: 16/07/2005, 10h50
  4. [Thread] Probleme avec mon Timer
    Par Nico66 dans le forum EDT/SwingWorker
    Réponses: 10
    Dernier message: 02/06/2005, 17h10

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