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 :

Initial SessionFactory creation failed.org.hibernate.cfg.beanvalidation.IntegrationException


Sujet :

Hibernate Java

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mai 2012
    Messages
    23
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mai 2012
    Messages : 23
    Points : 25
    Points
    25
    Par défaut Initial SessionFactory creation failed.org.hibernate.cfg.beanvalidation.IntegrationException
    Bonjour,

    Je ne parviens pas à initialiser ma connection hibernate(version 4.2.1), j'ai cette erreur

    Initial SessionFactory creation failed.org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration

    Voici mon HibernateUtil

    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
     
    public class HibernateUtil {
     
        private static final SessionFactory sessionFactory;
        private static ServiceRegistry serviceRegistry;
     
        static {
                       try {
     
                                       Configuration configuration = new Configuration();
                           configuration.configure();
                           serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();        
                           sessionFactory = configuration.buildSessionFactory(serviceRegistry);
                       } catch (Throwable ex) {
                                       System.err.println("Initial SessionFactory creation failed." + ex);
                                       throw new ExceptionInInitializerError(ex);
                       }
        }              
     
        public static SessionFactory getSessionFactory() {
                       return sessionFactory;
        }
    }
    Les Logs :

    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
     
    16 mai 2013 10:27:14 org.hibernate.annotations.common.Version <clinit>
    INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
    16 mai 2013 10:27:14 org.hibernate.Version logVersion
    INFO: HHH000412: Hibernate Core {4.2.1.Final}
    16 mai 2013 10:27:14 org.hibernate.cfg.Environment <clinit>
    INFO: HHH000206: hibernate.properties not found
    16 mai 2013 10:27:14 org.hibernate.cfg.Environment buildBytecodeProvider
    INFO: HHH000021: Bytecode provider name : javassist
    16 mai 2013 10:27:14 org.hibernate.cfg.Configuration configure
    INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
    16 mai 2013 10:27:14 org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
    16 mai 2013 10:27:14 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
    WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
    16 mai 2013 10:27:14 org.hibernate.cfg.Configuration doConfigure
    INFO: HHH000041: Configured SessionFactory: null
    16 mai 2013 10:27:15 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
    16 mai 2013 10:27:15 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000115: Hibernate connection pool size: 20
    16 mai 2013 10:27:15 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000006: Autocommit mode: false
    16 mai 2013 10:27:15 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000401: using driver [org.postgresql.Driver] at URL [jdbc:postgresql://localhost:5432/portail]
    16 mai 2013 10:27:15 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000046: Connection properties: {user=postgres, password=****}
    16 mai 2013 10:27:15 org.hibernate.dialect.Dialect <init>
    INFO: HHH000400: Using dialect: org.hibernate.dialect.HSQLDialect
    16 mai 2013 10:27:15 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
    INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
    16 mai 2013 10:27:15 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
    INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
    16 mai 2013 10:27:15 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
    INFO: HHH000397: Using ASTQueryTranslatorFactory
    Initial SessionFactory creation failed.org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration
    D'avance merci pour ton aide

  2. #2
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    Bonsoir,

    Il te manque les jar de validation hibernate-validator et ses dépendances.

    A+.

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

Discussions similaires

  1. Réponses: 1
    Dernier message: 03/03/2014, 13h10
  2. Réponses: 1
    Dernier message: 01/07/2011, 08h20
  3. Réponses: 4
    Dernier message: 11/06/2010, 13h29
  4. Réponses: 4
    Dernier message: 15/07/2008, 16h47
  5. Réponses: 8
    Dernier message: 17/04/2008, 17h29

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