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 :

ERROR: column this_.test does not exist


Sujet :

Hibernate Java

  1. #1
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut ERROR: column this_.test does not exist
    Bonjour, je suis débutant avec Hibernate et j'ai un problème assez casse pied. J'essaie d'obtenir une entitée de ma bd ( qui est en postgresql ) et j'ai le message d'erreur du titre. Je ne sais pas vraiment quoi faire puisque la colonne existe réellement. Je fais imprimer le query de Hibernate et il fonctionne parfaitement en "stand alone" dans un outil graphique connecté à ma bd. Si vous pouviez m'aider, voici les infos que vous risquez d'avoir besoins:

    Code:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    InIndiv individu = new InIndiv();
    	individu.setNom(nomUtilisateur);
    	List resultats = this.getListe( Example.create(individu)
    						.ignoreCase()
    						.enableLike());
    fichier de 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
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <!-- 
        Mapping file autogenerated by MyEclipse - Hibernate Tools
    -->
    <hibernate-mapping>
        <class name="com.dmr.dmns.modele.service.entiteesDonneesDmns.InIndiv" table="in_indiv" schema="public">
            <id name="idIndiv" type="integer">
                <column name="id_indiv" />
                <generator class="assigned" />
            </id>
            <property name="test" type="string">
                <column name="test" length="50" not-null="true" />
            </property>
            <property name="nom" type="string">
                <column name="nom" length="50" not-null="true" />
            </property>
            <property name="prenm" type="string">
                <column name="prenm" length="50" not-null="true" />
            </property>
            <property name="cdUtils" type="string">
                <column name="cd_utils" length="11" />
            </property>
            <property name="motPasse" type="string">
                <column name="mot_passe" length="11" />
            </property>
            <property name="noSeqncVerou" type="integer">
                <column name="no_seqnc_verou" not-null="true" />
            </property>
        </class>
    </hibernate-mapping>
    Stack trace
    2006-07-19 11:29:15,326 [http-8080-Processor25] DEBUG org.hibernate.SQL.log:346 - select this_.id_indiv as id1_4_0_, this_.test as test4_0_, this_.nom as nom4_0_, this_.prenm as prenm4_0_, this_.cd_utils as cd5_4_0_, this_.mot_passe as mot6_4_0_, this_.no_seqnc_verou as no7_4_0_ from public.in_indiv this_ where (lower(this_.nom) like ?)
    2006-07-19 11:29:15,386 [http-8080-Processor25] DEBUG org.hibernate.type.StringType.nullSafeSet:79 - binding 'fred' to parameter: 1
    2006-07-19 11:29:15,416 [http-8080-Processor25] WARN org.hibernate.util.JDBCExceptionReporter.logExceptions:71 - SQL Error: 0, SQLState: 42703
    2006-07-19 11:29:15,426 [http-8080-Processor25] ERROR org.hibernate.util.JDBCExceptionReporter.logExceptions:72 - ERROR: column this_.test does not exist
    2006-07-19 11:29:15,446 [http-8080-Processor25] ERROR com.dmr.dmns.framework.modele.intercepteur.LogiqueAffaireErreursControleurIntercepteur.appel:51 - RuntimeException Appel de la méthode initialiserSessionUtilisateur de la classe com.dmr.dmns.controleur.authentification.AuthentificationControleur
    org.springframework.dao.DataAccessResourceFailureException: Erreur pour obtenir une liste d'entitées.; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
    org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.loader.Loader.doList(Loader.java:2148)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1552)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
    at com.dmr.dmns.framework.modele.dao.hibernate.BaseDAOImpl.getListe(BaseDAOImpl.java:159)
    at com.dmr.dmns.modele.service.facetteIndividu.dao.hibernate.InIndivDAOImpl.authentifierUtilisateur(InIndivDAOImpl.java:33)
    at com.dmr.dmns.modele.service.facetteIndividu.service.local.IndividuServiceImpl.authentifier(IndividuServiceImpl.java:40)
    at com.dmr.dmns.modele.traitement.authentification.service.local.AuthentificationServiceImpl.initialiserSessionUtilisateur(AuthentificationServiceImpl.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at com.dmr.dmns.framework.modele.intercepteur.LogiqueAffaireErreursServiceIntercepteur.appel(LogiqueAffaireErreursServiceIntercepteur.java:34)
    at com.dmr.dmns.framework.modele.intercepteur.BaseIntercepteur.invoke(BaseIntercepteur.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at com.dmr.dmns.framework.modele.intercepteur.BaseIntercepteur.invoke(BaseIntercepteur.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    at $Proxy3.initialiserSessionUtilisateur(Unknown Source)
    at com.dmr.dmns.controleur.authentification.AuthentificationControleur.initialiserSessionUtilisateur(AuthentificationControleur.java:22)
    at com.dmr.dmns.controleur.authentification.AuthentificationControleur$$FastClassByCGLIB$$e8955878.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:698)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    at com.dmr.dmns.framework.modele.intercepteur.BaseIntercepteur.invoke(BaseIntercepteur.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at com.dmr.dmns.framework.modele.intercepteur.LogiqueAffaireErreursControleurIntercepteur.appel(LogiqueAffaireErreursControleurIntercepteur.java:37)
    at com.dmr.dmns.framework.modele.intercepteur.BaseIntercepteur.invoke(BaseIntercepteur.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
    at com.dmr.dmns.controleur.authentification.AuthentificationControleur$$EnhancerByCGLIB$$8ad45717.initialiserSessionUtilisateur(<generated>)
    at com.dmr.dmns.presentation.bean.commun.AuthentificationBean.loginAction(AuthentificationBean.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
    at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
    at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
    at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
    at javax.faces.component.UICommand.broadcast(UICommand.java:106)
    at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
    at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.dmr.dmns.presentation.filtres.AuthenticationFilter.doFilter(AuthenticationFilter.java:87)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.dmr.dmns.framework.presentation.filtre.compression.FiltreCompression.doFilter(FiltreCompression.java:158)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: org.postgresql.util.PSQLException: ERROR: column this_.test does not exist
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:258)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
    at org.hibernate.loader.Loader.doQuery(Loader.java:662)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    at org.hibernate.loader.Loader.doList(Loader.java:2145)
    Si vous avez besoin d'autre chose, je suis tout ouïe.

    Merci de m'aider

  2. #2
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    163
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 163
    Points : 143
    Points
    143
    Par défaut
    Essai de voir s'il cherche test en base ou en objet, modifie ton mapping en test2 par exemple. Sinon, tu utilises Spring? Ca peut venir de ça ? T'arrives à faire des requêtes simples autrement déjà ?

  3. #3
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    J'ai essayé de changer le type de ma colonne, de la renommer, rien y fait. Je commence donc à être à bout de solution. La version d'hibernate que j'utilise est la version 3.

    Oui j'utilise Spring et non je ne suis pas capable de faire des query simple d'une autre façon j'arrive toujours à la même conclusion ( ben erreur )

  4. #4
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    163
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 163
    Points : 143
    Points
    143
    Par défaut
    Un truc con, mais jpense pas que ce soit ça! Tes types d'attributs test... sont en string, mets String, pour qu'il voit bien que c'est des types objets. T'as bien une table cohérente avec tes mappings? Ca peut venir de ça aussi, du genre des champs à null dans la table, ou à 0, souvent quand les données ne sont pas initialisées par Hibernate.

  5. #5
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    Si je renomme test par test2 dans mon mapping, j'obtient la même erreur mais là, c'est vraiment vrai que test2 n'existe pas...

  6. #6
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    163
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 163
    Points : 143
    Points
    143
    Par défaut
    Quand tu renomme juste l'attribut objet en test2, dans ta classe aussi ! Pour voir sil cherche l'objet ou les données en base.

  7. #7
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    Oui, dans ma classe aussi ça fait ça.

    J'ai essayé de changer string par String pis il dit qu'il connaît pas ce type:
    Could not determine type for: String, for columns: [org.hibernate.mapping.Column(nom)]

    Pour ce qui est de la table associée à l'entité, oui elle existe bien. J'utilise MyEclipse et je fait générer mes entitées à partir de l'outil qu'il donne donc l'entité hibernate est la même que ma table, en tout point:

    code entité:
    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
    // Fields    
     
         private Integer idIndiv;
         private String test;
         private String nom;
         private String prenm;
         private String cdUtils;
         private String motPasse;
         private Integer noSeqncVerou;
     
     
        // Constructors
     
        /** default constructor */
        public InIndiv() {
        }
     
    	/** minimal constructor */
        public InIndiv(Integer idIndiv, String test, String nom, String prenm, Integer noSeqncVerou) {
            this.idIndiv = idIndiv;
            this.test = test;
            this.nom = nom;
            this.prenm = prenm;
            this.noSeqncVerou = noSeqncVerou;
        }
     
        /** full constructor */
        public InIndiv(Integer idIndiv, String test, String nom, String prenm, String cdUtils, String motPasse, Integer noSeqncVerou) {
            this.idIndiv = idIndiv;
            this.test = test;
            this.nom = nom;
            this.prenm = prenm;
            this.cdUtils = cdUtils;
            this.motPasse = motPasse;
            this.noSeqncVerou = noSeqncVerou;
        }
    plus tous les get-set ici



    Si je met l'attribut test en commentaire, ça fonctionne pour tous les suivants et ça bloque pour la même raison à mot_passe, je trouve vraiment ça bizarre...

  8. #8
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    163
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 163
    Points : 143
    Points
    143
    Par défaut
    Bizarre effectivement J'ai vu avec le plugin Hibernator, en effet, ('as bien raison les types des mappings sont avec une minuscule mais correspondent aux types objets. Ta table est vide? Tu l'as rempli avec Hibernate ?

  9. #9
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    La table était vide à l'origine, maintenant j'ai ajouté manuellement 1 enregistrement pour voir si le problème venait de là... Je pense que je vais essayer une autre table voir... sinon comment on fait pour remplir la table avec hibernate ??

  10. #10
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    Bon ben moitié bonne nouvelle moitiée mauvaise nouvelle. SI je change d'entitée, ça fonctionne #1 donc on dirait vraiment que c'est cette table qui cause problème... Si jamais vous avez d'autres idées, gènez vous pas.

  11. #11
    Membre régulier
    Inscrit en
    Juillet 2006
    Messages
    74
    Détails du profil
    Informations personnelles :
    Âge : 41

    Informations forums :
    Inscription : Juillet 2006
    Messages : 74
    Points : 90
    Points
    90
    Par défaut
    Ta méthode getListe elle est dans une classe a part ou pas ? essaye de la déplacer dans une autre pour voir ce que ça donne

  12. #12
    Membre éclairé Avatar de BizuR
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    688
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 688
    Points : 757
    Points
    757
    Par défaut
    Salut,

    Bien que l'on te fasse confiance, pourrais tu laisser ici :
    un desc de ta table in_indiv ainsi que la classe InIndiv elle-même.
    (Bon pour la classe elle apparait plus bas en fait donc j'ai rien dit.)

    Sinon, en effet l'erreur peut sembler étrange. Je vais donc moi aussi tenter de te filer un coup de main la dessus (on sait jamais ^^)
    See you, space cowboy... and if you're satisfied, click on

  13. #13
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    D'accord, je vais mettre ça ici, dsl si ça été un peu long, mais je sais pu où donner de la tête, merci pour l'aide.

    CREATE TABLE IN_INDIV (
    ID_INDIV integer NOT NULL default nextval('seq_ID_INDIV'),
    test char(11) NOT NULL,
    NOM char(50) NOT NULL,
    PRENM char(50) NOT NULL,
    CD_UTILS char(11) NULL,
    MOT_PASSE char(11) NULL,
    NO_SEQNC_VEROU integer NOT NULL,
    PRIMARY KEY(ID_INDIV)
    );

    C'est la description de ma table autre chose que vous avez besoins ?

  14. #14
    Membre éclairé Avatar de BizuR
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    688
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 688
    Points : 757
    Points
    757
    Par défaut
    bon ca ne changera surement rien mais tu peux déjà mettre à jour ton mapping avec test dont la longueur du char n'est égale qu'a 11 et non 50.

    Ensuite, essaie un mapping manuel avec :

    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
     
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
        <class name="com.dmr.dmns.modele.service.entiteesDonneesDmns.InIndiv" table="IN_INDIV" schema="public">
            <id name="idIndiv" column="ID_INDIV">
                <generator class="assigned" />
            </id>
            <property name="test" column="TEST" />
            <property name="nom" column="NOM" />
            <property name="prenm" column="PRENM" />
            <property name="cdUtils" column="CD_UTILS" />
            <property name="motPasse" column="MOT_PASSE" />
            <property name="noSeqncVerou" column="NO_SEQNC_VEROU" />
        </class>
    </hibernate-mapping>
    Cette version laisse plus de pouvoir à Hibernate qui va interpreter et joindre les type entre eux... pour ma part c'est ce que j'utilise tout le temps et jen'ai jamais eu aucun problème de mapping. PS: L'attribut schema n'est utile que si tu utilises plusieurs base de données, si tu n'en as qu'une seule, une fois spécifiée dans la connexion, elle n'est plus utile dans le mapping (a toi de voir si tu la laisses ou non )
    See you, space cowboy... and if you're satisfied, click on

  15. #15
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    Bon ben merci pour l'idée, mais elle ne fonctionne tout de même pas :S Là je vais supprimer toute ma bd ainsi que toutes mes entitées et refaire générer. On verra ce que ça va donner. Si vous avez d'autres idées, ne vous genez pas.

  16. #16
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    Ben je vous confirme que le fait de regénérer les entitées ça change RIEN !!! Bon j'ai toujours la même erreur, je continues à chercher sur le net mais si jamais vous avez d'autres idées, faites le moi savoir, je suis vraiment à bout...

  17. #17
    Membre émérite
    Avatar de Nesmontou
    Homme Profil pro
    Architecte logiciel
    Inscrit en
    Septembre 2004
    Messages
    1 612
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Architecte logiciel
    Secteur : Finance

    Informations forums :
    Inscription : Septembre 2004
    Messages : 1 612
    Points : 2 969
    Points
    2 969
    Par défaut
    Salut, je ne sais pas si ça vient de là, mais dans la description de ta table, seul le champ 'test' est écrit en minuscule. C'est peut-être ça le problème (je sais qu'un copain avait eu ce problème de casse en particulier pour le passage Windows => Linux)

    Autant rester cohérent et garder la même casse pour tout
    Si vous ne pouvez expliquer un concept à un enfant de six ans, c'est que vous ne le comprenez pas complètement. Albert EINSTEIN

    F.A.Q. : Java, PHP, (X)HTML / CSS

    N'oubliez pas de cliquer sur le bouton Résolu en bas de page quand vous avez obtenu une solution à votre problème

  18. #18
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10
    Points : 1
    Points
    1
    Par défaut
    Bon, j'ai finalement réglé mon problème... je suis dsl de vous avoir fait perdre votre temps, mais finalement le problème était que mon datasource ne pointait pas sur la bonne bd, donc la colonne dans ma vraie bd existait bel et bien, mais la bd qui était utilisé ne contenait pas cette colonne.

    Merci de votre aide

Discussions similaires

  1. Réponses: 7
    Dernier message: 31/01/2015, 19h50
  2. Réponses: 0
    Dernier message: 15/07/2014, 09h25
  3. [ANT] error: package javax.servlet does not exist
    Par DUCKY_ dans le forum Eclipse Java
    Réponses: 4
    Dernier message: 24/07/2012, 15h42
  4. Réponses: 1
    Dernier message: 01/07/2010, 10h50
  5. ERROR: relation "MaTable" does not exist (pgAdmin
    Par Népomucène dans le forum PostgreSQL
    Réponses: 2
    Dernier message: 01/02/2006, 14h17

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