These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: [hibernate][mysql] erreurs
PostPosted: Tue Apr 25, 2006 6:03 am 
Newbie

Joined: Tue Apr 25, 2006 5:54 am
Posts: 1
Bonjour,

je réalise une appli J2EE avec hibernate et mysql pour la persistance.

Chez moi j'utilisais easyphp comme serveur mysql et j'ai aucun problème.
Maintenant, je change de machine avec mysql simplement et avec le même projet, les mêmes paramètre de base etc. j'ai un problème lors de la création de tables ou séléction de données.

Voiçi mon message d'erreur généré par hibernate :
Code:
ERROR - Unsuccessful: alter table T_SAL_PC add index FK48ACE45F7FB5233C (sal_id), add constraint FK48ACE45F7FB5233C foreign key (sal_id) references T_SAL_SALLE (sal_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_SAL_RETROPROJECTEUR add index FK531CC21B7FB5233C (sal_id), add constraint FK531CC21B7FB5233C foreign key (sal_id) references T_SAL_SALLE (sal_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_SAL_TABLEAU add index FKC9D2E1767FB5233C (sal_id), add constraint FKC9D2E1767FB5233C foreign key (sal_id) references T_SAL_SALLE (sal_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_SAL_UTILISATIONSALLE add index FKA63ECB1A7FB5233C (sal_id), add constraint FKA63ECB1A7FB5233C foreign key (sal_id) references T_SAL_SALLE (sal_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_SAL_VIDEOPROJECTEUR add index FKF5CBC3B87FB5233C (sal_id), add constraint FKF5CBC3B87FB5233C foreign key (sal_id) references T_SAL_SALLE (sal_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_VOI_ENTRETIENT add index FKD087CEF25500FAAA (voi_id), add constraint FKD087CEF25500FAAA foreign key (voi_id) references T_VOI_VOITURE (voi_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_VOI_FACTURE add index FK43329762176FE5AB (ent_id), add constraint FK43329762176FE5AB foreign key (ent_id) references T_VOI_ENTRETIENT (ent_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_VOI_UTILISATIONVOITURE add index FK5531B3952CEDCCFF (use_id), add constraint FK5531B3952CEDCCFF foreign key (use_id) references T_USE_USER (use_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
ERROR - Unsuccessful: alter table T_VOI_UTILISATIONVOITURE add index FK5531B3955500FAAA (voi_id), add constraint FK5531B3955500FAAA foreign key (voi_id) references T_VOI_VOITURE (voi_id)
ERROR - Can't create table '.\gestentrep\#sql-c70_4.frm' (errno: 150)
Hibernate: select user0_.use_id as use1_10_, user0_.use_login as use2_10_, user0_.use_password as use3_10_, user0_.use_droits as use4_10_, user0_.use_nom as use5_10_, user0_.use_numeroDeTel as use6_10_, user0_.use_numeroDeTel2 as use7_10_, user0_.use_numeroDePoste as use8_10_, user0_.use_nomDeService as use9_10_, user0_.use_divers as use10_10_ from T_USE_USER user0_ where use_id=4
null




J'ai d'abord pensé que j'avais un problème de droit mais j'utilise l'utilisateur root et il a tous les privilèges sur ma base.
Le pire c'est que les tables sont quand même correctement créees mais impossible de les utiliser.

Voiçi pour info mon fichier de conf hibernate :
Code:
<hibernate-configuration>

    <session-factory>
        <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost/gestentrep</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.connection.password">admin</property>
        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="show_sql">true</property>
        <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
        <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
        <property name="hibernate.hbm2ddl.auto">update</property>

        <mapping resource="fr/gestentrep/salles/PC.hbm.xml"/>
        <mapping resource="fr/gestentrep/salles/RetroProjecteur.hbm.xml"/>
        <mapping resource="fr/gestentrep/salles/Salle.hbm.xml"/>
        <mapping resource="fr/gestentrep/salles/Tableau.hbm.xml"/>
        <mapping resource="fr/gestentrep/salles/UtilisationSalle.hbm.xml"/>
        <mapping resource="fr/gestentrep/salles/VideoProjecteur.hbm.xml"/>
        <mapping resource="fr/gestentrep/voitures/Entretient.hbm.xml"/>
        <mapping resource="fr/gestentrep/voitures/Facture.hbm.xml"/>
        <mapping resource="fr/gestentrep/voitures/UtilisationVoiture.hbm.xml"/>
        <mapping resource="fr/gestentrep/voitures/Voiture.hbm.xml"/>
        <mapping resource="fr/gestentrep/users/User.hbm.xml"/>
    </session-factory>

</hibernate-configuration>




vous voyez d'où ca peut venir?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.