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

Maven Java Discussion :

maven hibernate jsf jboss


Sujet :

Maven Java

  1. #1
    Candidat au Club
    Inscrit en
    Octobre 2006
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Octobre 2006
    Messages : 5
    Points : 3
    Points
    3
    Par défaut maven hibernate jsf jboss
    j'ai crée un projet maven java ( jpa hibernate avec annotation sous jboss ) , mon projet fonctionne trés bien, la connexion à ma base mysql , l'affichage de données, tout, j'ai ajouté les lib nécessaires ( hibernate, hibernate annotation, hibernate entity-manager, ..) . Maintenant, j'ai créé un projet web , j'ai utilisé jsf et jboss , si je teste mon dao par exp ( avec un main) tt fonctionne bien, le passage avec un managed bean pour une page jsf présente des problème .
    voici le code d'erreur :
    org.apache.jasper.JasperException: javax.servlet.ServletException: /welcomeJSF.jsp(23,16) '#{Mybean.lastname}' Error reading 'lastname' on type service.CtrlPerson
    ...
    javax.persistence.PersistenceException: [PersistenceUnit: UnitN] Unable to configure EntityManagerFactory
    org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
    org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
    ...


    org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)

    help plz

  2. #2
    Membre habitué
    Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    133
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2007
    Messages : 133
    Points : 149
    Points
    149
    Par défaut
    javax.persistence.PersistenceException: [PersistenceUnit: UnitN] Unable to configure EntityManagerFactory
    Comment est ton fichier persistence.xml ?

    http://docs.jboss.org/hibernate/stab...iguration.html

  3. #3
    Candidat au Club
    Inscrit en
    Octobre 2006
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Octobre 2006
    Messages : 5
    Points : 3
    Points
    3
    Par défaut
    merci pour votre réponse

    voici le code de persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="UnitN" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <class>dto.Person</class>
    <properties>

    <property name="hibernate.connection.username" value="xxx"/>
    <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
    <property name="hibernate.connection.password" value="xxx"/>
    <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/PersonDB"/>
    <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
    <property name="hibernate.c3p0.min_size" value="5"/>
    <property name="hibernate.c3p0.max_size" value="20"/>
    <property name="hibernate.c3p0.timeout" value="300"/>
    <property name="hibernate.c3p0.max_statements" value="50"/>
    <property name="hibernate.c3p0.idle_test_period" value="3000"/>
    </properties>
    </persistence-unit>
    </persistence>

  4. #4
    Candidat au Club
    Inscrit en
    Octobre 2006
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Octobre 2006
    Messages : 5
    Points : 3
    Points
    3
    Par défaut
    quelqu'un a une idée ? plzzzzz

  5. #5
    Membre habitué
    Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    133
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2007
    Messages : 133
    Points : 149
    Points
    149
    Par défaut
    org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
    Je n'avais pas vu ça dans ta stacktrace, tu dois peut-être avoir un conflit de version au niveau de la libaririe hibernate-annotations (peut-être déployée dans l'appli maven alors qu'elle est déjà dans les librairies du serveur).

    Le souci ne doit pas être dans le persistence.xml vu qu'il marche déjà apparement. Vérifie s'il est bien déployé sinon.

    Enfin, regardes en priorité le problème de librairies.

Discussions similaires

  1. Intégration Spring Hibernate JSF avec Maven
    Par theboss0 dans le forum Frameworks Web
    Réponses: 8
    Dernier message: 11/03/2014, 17h21
  2. jboss seam+ hibernate +jsf
    Par k4a44 dans le forum JSF
    Réponses: 1
    Dernier message: 27/05/2010, 16h24
  3. Configuration maven jsf jboss
    Par Hoffnung dans le forum Maven
    Réponses: 0
    Dernier message: 16/08/2009, 11h24
  4. Réponses: 3
    Dernier message: 15/03/2007, 12h20
  5. Hibernate-JSF
    Par zakjo_developper dans le forum Hibernate
    Réponses: 7
    Dernier message: 10/05/2006, 11h32

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