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 :

Hibernate Exemple Simple


Sujet :

Hibernate Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    277
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 277
    Par défaut Hibernate Exemple Simple
    Bonjour,


    Je viens de commencer à voir hibernante par curiosité:

    mais pendant mon teste j'ai ce message, je ne sais pas encore contourner le problème....



    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
    13/Mai/2009 23:13:20 net.sf.hibernate.cfg.Environment <clinit>
    INFO: Hibernate 2.1.8
    13/Mai/2009 23:13:20 net.sf.hibernate.cfg.Environment <clinit>
    INFO: hibernate.properties not found
    13/Mai/2009 23:13:20 net.sf.hibernate.cfg.Environment <clinit>
    INFO: using CGLIB reflection optimizer
    13/Mai/2009 23:13:20 net.sf.hibernate.cfg.Environment <clinit>
    INFO: using JDK 1.4 java.sql.Timestamp handling
    13/Mai/2009 23:13:32 net.sf.hibernate.cfg.Configuration configure
    INFO: configuring from resource: /hibernate.cfg.xml
    13/Mai/2009 23:13:32 net.sf.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: Configuration resource: /hibernate.cfg.xml
    13/Mai/2009 23:13:33 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: empleado.hbm
    13/Mai/2009 23:13:36 net.sf.hibernate.cfg.Binder bindRootClass
    INFO: Mapping class: formacion.beans.empleado.Empleado -> EMPLEADOS
    13/Mai/2009 23:13:36 net.sf.hibernate.cfg.Configuration addResource
    INFO: Mapping resource: departamento.hbm
    13/Mai/2009 23:13:37 net.sf.hibernate.cfg.Binder bindRootClass
    INFO: Mapping class: formacion.beans.departamento.Departamento -> DEPARTAMENTO
    13/Mai/2009 23:13:37 net.sf.hibernate.cfg.Configuration doConfigure
    INFO: Configured SessionFactory: null
    13/Mai/2009 23:14:23 net.sf.hibernate.cfg.Configuration secondPassCompile
    INFO: processing one-to-many association mappings
    13/Mai/2009 23:14:23 net.sf.hibernate.cfg.Configuration secondPassCompile
    INFO: processing one-to-one association property references
    13/Mai/2009 23:14:23 net.sf.hibernate.cfg.Configuration secondPassCompile
    INFO: processing foreign key constraints
    13/Mai/2009 23:14:23 net.sf.hibernate.cfg.SettingsFactory buildSettings
    WARNING: No dialect set - using GenericDialect: Dialect class not found: org.hibernate.dialect.MySQLDialect
    13/Mai/2009 23:14:23 net.sf.hibernate.dialect.Dialect <init>
    INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect
    13/Mai/2009 23:14:23 net.sf.hibernate.cfg.SettingsFactory buildSettings
    INFO: Use outer join fetching: true
    13/Mai/2009 23:14:23 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: Using Hibernate built-in connection pool (not for production use!)
    13/Mai/2009 23:14:23 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: Hibernate connection pool size: 20
    13/Mai/2009 23:14:23 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/formacion
    13/Mai/2009 23:14:23 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: connection properties: {user=formacion, password=formacion}
    13/Mai/2009 23:14:24 net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
    INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
    13/Mai/2009 23:14:24 net.sf.hibernate.cfg.SettingsFactory buildSettings
    INFO: Use scrollable result sets: true
    13/Mai/2009 23:14:24 net.sf.hibernate.cfg.SettingsFactory buildSettings
    INFO: Use JDBC3 getGeneratedKeys(): true
    13/Mai/2009 23:14:24 net.sf.hibernate.cfg.SettingsFactory buildSettings
    INFO: Optimize cache for minimal puts: false
    13/Mai/2009 23:14:24 net.sf.hibernate.cfg.SettingsFactory buildSettings
    INFO: Query language substitutions: {}
    13/Mai/2009 23:14:24 net.sf.hibernate.cfg.SettingsFactory buildSettings
    INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider
    Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
    	at java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
    	at java.lang.Class.getConstructor0(Class.java:2671)
    	at java.lang.Class.newInstance0(Class.java:321)
    	at java.lang.Class.newInstance(Class.java:303)
    	at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:142)
    	at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1172)
    	at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
    	at formacion.beans.departamento.base._BaseRootDAO.initialize(_BaseRootDAO.java:54)
    	at formacion.beans.departamento.base._BaseRootDAO.initialize(_BaseRootDAO.java:38)
    	at com.test.hibernate.Test.main(Test.java:21)


    Je vous remercie d'avance.

  2. #2
    Membre émérite Avatar de zorm
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    584
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Décembre 2004
    Messages : 584
    Par défaut
    Bonjour,

    Il semble qu'il te manque une classe CacheException. A mon avis, tu ne dois pas avoir le JAR ehcache.jar dans ton projet.

  3. #3
    Modérateur
    Avatar de OButterlin
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    7 313
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 7 313
    Billets dans le blog
    1
    Par défaut
    En passant, net.sf.etc... fait référence à une ancienne version d'Hibernate, il serait judicieux de commencer par la dernière version (v3)...

    Pour t'assister au début, tu peux également installer les pluggins JBoss Tools (si tu utilises Eclipse), on peut le trouver ici
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    277
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 277
    Par défaut
    Bonjour,

    Oui c'est exacte, j'ai une version 2.8... Je vais essayer de passer â la version 3.0

    Il me manquais plusieurs jar merci!

    Merci!

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

Discussions similaires

  1. exemple simple de css
    Par rasleboldesid dans le forum Mise en page CSS
    Réponses: 26
    Dernier message: 23/08/2006, 18h44
  2. Réponses: 5
    Dernier message: 21/07/2006, 08h25
  3. [RMI] Exemple simple de mise en place
    Par Marc90 dans le forum API standards et tierces
    Réponses: 8
    Dernier message: 31/05/2006, 16h17
  4. [Framework] Recherche d'exemple simple
    Par anaon dans le forum Spring
    Réponses: 4
    Dernier message: 26/04/2006, 16h08
  5. recherche exemple simple pour corba en c++
    Par Pinggui dans le forum CORBA
    Réponses: 4
    Dernier message: 06/05/2002, 11h29

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