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 :

Problème de mapping Hibernate XML


Sujet :

Hibernate Java

  1. #1
    Nouveau Candidat au Club
    Inscrit en
    Avril 2009
    Messages
    1
    Détails du profil
    Informations forums :
    Inscription : Avril 2009
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Problème de mapping Hibernate XML
    Bonjour a tous

    j'ai un problème de mapping many-to-one hibernate xml
    Code xml : 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">
    <!-- Generated 8 d?c. 2011 16:31:08 by Hibernate Tools 3.4.0.CR1 -->
    <hibernate-mapping>
        <class name="Driver" table="DRIVER">
            <id name="IdDriver" type="int">
                <column name="IDDRIVER" />
                <generator class="sequence">
                 <param name="sequence">seq_driver_id</param>
                </generator>
            </id>
       <many-to-one  name= "customer" column = "idCustomer" class="Customer"  / > 
            <property name="CinDriver" type="java.lang.String">
                <column name="CINDRIVER" />
            </property>


    Code x : 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
    could not execute query
    	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
    	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at tn.tucs.rcs.webs.connexion.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:63)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    	at java.lang.Thread.run(Thread.java:636)
    Caused by: javax.faces.el.EvaluationException: org.hibernate.exception.SQLGrammarException: could not execute query
    	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    	... 22 more
    Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
    	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
    	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    	at org.hibernate.loader.Loader.doList(Loader.java:2231)
    	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
    	at org.hibernate.loader.Loader.list(Loader.java:2120)
    	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
    	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
    	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
    	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
    	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    	at tn.tucs.core.fleetmanagement.ListDriver.Search(ListDriver.java:180)
    	at tn.tucs.core.geo.LastPosition.LastPointV(LastPosition.java:205)
    	at tn.tucs.core.geo.CurrentPosition.Current_position(CurrentPosition.java:51)
    	at tn.tucs.rcs.webs.connexion.User.logger(User.java:156)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:616)
    	at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
    	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
    	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    	... 23 more
    Caused by: org.postgresql.util.PSQLException: ERREUR: la colonne driver0_.idcustomer n'existe pas

  2. #2
    Membre actif
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Octobre 2006
    Messages
    288
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine et Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2006
    Messages : 288
    Points : 261
    Points
    261
    Par défaut
    Citation Envoyé par khoukha83 Voir le message
    Bonjour a tous

    Caused by: org.postgresql.util.PSQLException: ERREUR: la colonne driver0_.idcustomer n'existe pas
    La colonne idcustomer n'existe pas !
    Montres-nous ton code ( requetes et objets )
    Merci de lire les règles du forum et surtout celle là Message clair et précis.
    Evitons les ctrl c ctrl v => Ne sortons pas les codes de leur contexte sinon ça ne marche pas.

Discussions similaires

  1. Réponses: 3
    Dernier message: 22/04/2014, 14h37
  2. Problème de mapping Hibernate
    Par daly2009 dans le forum Hibernate
    Réponses: 0
    Dernier message: 29/09/2010, 13h23
  3. Problème de mapping hibernate
    Par eljoemed dans le forum Hibernate
    Réponses: 0
    Dernier message: 25/08/2010, 16h21
  4. Problème de Mapping Hibernate
    Par nyrami dans le forum Hibernate
    Réponses: 18
    Dernier message: 31/12/2007, 17h22
  5. [Data] Problème de mapping hibernate
    Par erwan.bodere dans le forum Spring
    Réponses: 1
    Dernier message: 28/04/2007, 20h43

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