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

JSF Java Discussion :

Probleme avec "Affichage liste avec la balise dataTable"


Sujet :

JSF Java

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut Probleme avec "Affichage liste avec la balise dataTable"
    Bonjour à tous,

    Je viens d'afficher ma premiere page Jsf . Mais pas totalement. J'ai beaucoup ramé pour le déploiement. Ainsi j'ai opté pour l'environnement qui me semble le plus facile à intégrer (NetBeans+GlassFissh+TopLink). Passons.

    Mon problème est que je n'arrive pas à afficher ma dataTable. Elle doit itérer sur une liste de personnes. J'ai joints des copies de l'arborescence du projet Personne.

    Voici mes sources:

    Entité Personne.java
    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
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
     
    package entity;
     
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
     
    /**
     *
     * @author 
     */
    @Entity
    @Table(name = "personne")
    @NamedQueries({@NamedQuery(name = "Personne.findByIdPersonne", query = "SELECT p FROM Personne p WHERE p.idPersonne = :idPersonne"), @NamedQuery(name = "Personne.findByNom", query = "SELECT p FROM Personne p WHERE p.nom = :nom"), @NamedQuery(name = "Personne.findByPrenom", query = "SELECT p FROM Personne p WHERE p.prenom = :prenom")})
    public class Personne implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Column(name = "idPersonne", nullable = false)
        private Integer idPersonne;
        @Column(name = "nom", nullable = false)
        private String nom;
        @Column(name = "prenom", nullable = false)
        private String prenom;
     
        public Personne() {
        }
     
        public Personne(Integer idPersonne) {
            this.idPersonne = idPersonne;
        }
     
        public Personne(Integer idPersonne, String nom, String prenom) {
            this.idPersonne = idPersonne;
            this.nom = nom;
            this.prenom = prenom;
        }
     
        public Integer getIdPersonne() {
            return idPersonne;
        }
     
        public void setIdPersonne(Integer idPersonne) {
            this.idPersonne = idPersonne;
        }
     
        public String getNom() {
            return nom;
        }
     
        public void setNom(String nom) {
            this.nom = nom;
        }
     
        public String getPrenom() {
            return prenom;
        }
     
        public void setPrenom(String prenom) {
            this.prenom = prenom;
        }
     
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (idPersonne != null ? idPersonne.hashCode() : 0);
            return hash;
        }
     
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Personne)) {
                return false;
            }
            Personne other = (Personne) object;
            if ((this.idPersonne == null && other.idPersonne != null) || (this.idPersonne != null && !this.idPersonne.equals(other.idPersonne))) {
                return false;
            }
            return true;
        }
     
        @Override
        public String toString() {
            return "entity.Personne[idPersonne=" + idPersonne + "]";
        }
     
    }
    Interface locale PersonneLocale
    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
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
     
    package stateless;
     
    import entity.Personne;
    import java.util.List;
    import javax.ejb.Local;
     
    /**
     *
     * @author 
     */
    @Local
    public interface PersonneLocale {
     
        public Personne CreatePersonne(Personne pers);
     
        public List<Personne> FindAllPersonne();
     
        public List<Personne> getPersonne();
     
     
    }
    Classe EJB Stateless PersonneBeanDao
    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
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
     
    package stateless;
     
    import entity.Personne;
    import java.util.List;
    import javax.persistence.EntityManager;
    //import javax.persistence.PersistenceContext;
    import javax.persistence.Persistence;
     
    /**
     *
     * @author 
     */
    public class PersonneBeanDao implements PersonneLocale{
     
        //@PersistenceContext(unitName="PersonnePU")
        private EntityManager em;
        private static final String JPA_UNIT_NAME="PersonnePU2";
     
     
     
        protected EntityManager getEntityManager() {
            if (em==null)
                em=Persistence.createEntityManagerFactory(JPA_UNIT_NAME).createEntityManager();
            return em;
     
        }
     
     
        public Personne CreatePersonne(Personne pers) {
     
            throw new UnsupportedOperationException("Not supported yet.");
        }
     
        public List<Personne> FindAllPersonne() {
     
            List<Personne> persons = getEntityManager().createQuery("Select p from personne p").getResultList();
            return persons;
        }
     
        public List<Personne> getPersonne() {
            throw new UnsupportedOperationException("Not supported yet.");
        }
     
    }
    Contrôleur Jsf PersonneController
    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
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
     
    package Jsf;
     
    import entity.Personne;
    import java.util.List;
    import stateless.PersonneBeanDao;
     
    /**
     *
     * @author 
     */
    public class PersonneController {
     
        private PersonneBeanDao persDAO =new PersonneBeanDao();
        private List<Personne> personnes;
     
        public List<Personne> getPersonne(){
            if(personnes==null)
                personnes=persDAO.FindAllPersonne();
            return personnes;
        }
     
        /* public List<Personne> doFindAllPersonne(){
            if(persons==null)
                persons=persDAO.FindAllPersonne();
            return persons;
        }*/
     
    }
    index.jsp
    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
    <%-- 
        Document   : index
        Created on : 19 août 2008, 12:25:45
        Author     :
    --%>
     
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
     
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <jsp:forward page="list.jsf"/>
        </body>
    </html>
    list.jsp
    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
    <%-- 
        Document   : list
        Created on : 19 août 2008, 14:35:24
        Author     : 
    --%>
     
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Liste des personnes</title>
        </head>
        <body>
     
            <f:view>
                <h1><h:outputText value="Hello avec JSF" /></h1>
                <h:form>
                    <h:outputText value="Prénom" />
                    <h:inputText /><br>
     
                    <h:outputText value="Nom" />
                    <h:inputText /><br>
                    <h:commandButton value="Envoyer" />
                 </h:form>
     
     
                <h:dataTable border="0" rules="all" value="#{personneCtrl.personne}" var="p">
     
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Prénom" />
                        </f:facet>
                        <h:outputText value="#{p.prenom}" />
                     </h:column>
     
                     <h:column>
                        <f:facet name="header">
                            <h:outputText value="Nom" />
                        </f:facet>
                        <h:outputText value="#{p.nom}" />
                     </h:column>
                 </h:dataTable>
            </f:view>
     
        </body>
    </html>
    web.xml
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <display-name>Personne</display-name>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
     
     
     
     
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>

    et enfin faces-config.xml
    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
    <?xml version="1.0" encoding="UTF-8"?>
     
    <!--
        Document   : faces-config.xml
        Created on : 19 août 2008, 12:40
        Author     : 
        Description:
            Purpose of the document follows.
    -->
     
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                  version="1.2">
     
     <managed-bean>
         <managed-bean-name>personneCtrl</managed-bean-name>
         <managed-bean-class>Jsf.PersonneController</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
     <managed-bean>
        <managed-bean-name>login</managed-bean-name>
        <managed-bean-class>entity.LoginBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
     
    </faces-config>

  2. #2
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    Pour afficher une dataTable il te suffit d'une liste déclarée dans ton bean, de la déclaration de ton bean (déclaré dans ton face-config bien sur), et des balises dataTable. exemple:

    le face-config:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    <managed-bean>
    	<managed-bean-name>BeanList</managed-bean-name>
    	<managed-bean-class>com.bean.BeanList</managed-bean-class>
    	<managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    Le Bean contenant la liste (BeanList):
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    private List<Object> list;
    // juste besoin du get
    public List<object> getList()
    	{
    		return list;
    	}
    et dans ta jsp:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    <html:dataTable value="#{BeanList.list}" var="objet" border="1">
    	<html:column>
    		<core:facet name="header">
    			<html:outputText value="titre_1"/>
    		</core:facet>
    		<html:outputText value="#{list.attribut}">
    	</html:column>
    </html:dataTable>
    Si tu veux voir un exemple plus complexe, j'ai ouvert un topic qui en parle, mais il n'y a que la jsp.
    Si tu as pas compris un truc demande, y a pas de souci.

  3. #3
    Membre éclairé

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    639
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 639
    Par défaut
    ça ne serait pas plutôt :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <html:outputText value="#{objet.attribut}">
    ?
    mais je peux me tromper!!!

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    exacte, désolé pour l'erreur

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    Merci iviath et tomy29. Après correction (Ajout d'un s à PersonneController.getPersonnes() ). Je pense avoir suivi ton conseil mais j'ai toujours rien. Bizarre . Soit mon bean #{personneCtrl.personnes} ne récupère rien soit mon FireFox 3 a un probleme.

  6. #6
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    Je viens de capter un changement de scope proposé iviath. ça changerait quelques choses en remplaçant session par request ? Je pense pas. Mais bon j'ai essayé et mon dataTable ne s'affiche toujours pas.

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    ca changera pas grand chose, session veut dire que ton bean est mise en session, c'est a dire que tant que tu ne décide pas de le détruire ou que tu ne ferme pas la session le bean reste stocké en mémoire, request veut dire que le ben est stocké le temps de la requête.

    Montre moi le code de ton datatable et le get de ta liste je vais regarder ca, le reste n as pas vraiment d importance du moment que ton bean est bien déclarer.

  8. #8
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    Je crois que le problème se trouve au niveau de ma requête avec TopLink. Elle n'est peut-être pas correcte.

    mon dataTable
    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
     <h:dataTable border="0" rules="all" value="#{personneCtrl.personnes}" var="p">
                   
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Prénom" />
                        </f:facet>
                        <h:outputText value="#{p.prenom}" />
                     </h:column>
                     
                     <h:column>
                        <f:facet name="header">
                            <h:outputText value="Nom" />
                        </f:facet>
                        <h:outputText value="#{p.nom}" />
                     </h:column>
                 </h:dataTable>
            </f:view>
    mon controleur Jsf
    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
    public class PersonneController {
        
        private PersonneBeanDao persDAO =new PersonneBeanDao();
        private List<Personne> personnes;
        private Personne newPers = new Personne();
        
        public Personne getNewPers(){
            return newPers;
        }
        public List<Personne> getPersonnes(){
            if(personnes==null)
                personnes=persDAO.FindAllPersonne();
            return personnes;
        }
        
        public String CreatePersonne(){
            
            persDAO.InsertPersonne(newPers);
            newPers = new Personne();
            personnes = persDAO.FindAllPersonne();
            return "list";
            
        }
    
    }
    et mon DAO
    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
    public class PersonneBeanDao implements PersonneLocale{
    
        //@PersistenceContext(unitName="PersonnePU")
        private EntityManager em;
        private static final String JPA_UNIT_NAME="PersonnePU2";
        
        
        
        protected EntityManager getEntityManager() {
            if (em==null)
                em=Persistence.createEntityManagerFactory(JPA_UNIT_NAME).createEntityManager();
            return em;
           
        }
        
        
       public List<Personne> FindAllPersonne() {
            
            List<Personne> persons = getEntityManager().createQuery("Select p from personne p").getResultList();
            return persons;
        }
    
        public Personne InsertPersonne(Personne pers) {
            
            getEntityManager().getTransaction().begin();
            getEntityManager().persist(pers);
            getEntityManager().getTransaction().commit();
            
            return pers;
        }

  9. #9
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    première chose initialise ta liste c est mieux, List<Personne> = new ArrayList<Personne>(); quand tu la déclare.
    A tu testé au debuger que ta liste n'était pas vide?
    mets border="1" pour voir si le tableau vide s affiche au moins

  10. #10
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    Le tableau s'affiche avec border=1. Seulement il est vide.
    il y a une erreur au niveau de la requête.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    Caused by: Exception [TOPLINK-8034] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.EJBQLException
     
    Exception Description: Error compiling the query [Select p from personne p]. Unknown abstract schema type [personne].

  11. #11
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    ejb c est pas trop mon fort, poste plutôt ton problème sur le topic des ejb. Tu aura plus de chance de trouver quelqu'un de compétant. Au niveau de la table normalement y a pas de problème, du moins j'en vois pas.

  12. #12
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    Ok merci pour ton aide.

    Pruderic

  13. #13
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    158
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 158
    Par défaut
    Au fait, a froid je dirait qu'il y a un problème de mapping avec ta table personne, soit c'est l'objet qui déconne soit l'objet de mapping. Mais comme je t'ai dit j'y connait trop rien.

  14. #14
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    T'as le bon réflexe. Mais aussi les annotations @Stateless , @Local et autres sont oubliées. Je revois toute ma copie. Je te tiens au courant

    Pruderic

  15. #15
    Rédacteur
    Avatar de longbeach
    Profil pro
    Architecte de système d’information
    Inscrit en
    Avril 2003
    Messages
    943
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Architecte de système d’information

    Informations forums :
    Inscription : Avril 2003
    Messages : 943
    Par défaut
    Il y a des erreurs :
    1) Si PersonneBeanDao est un stateless bean, pourquoi je ne vois pas l'annotation @Stateless ?

    2) Dans PersonneController :

    private PersonneBeanDao persDAO =new PersonneBeanDao();

    ==> Il faut faire un lookup, ou une injection

  16. #16
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    C'est vrai j'ai remédié a tout ça sauf à
    @EJB
    private PersonneBeanDao persDAO;
    Et c'est là que j'ai une erreur sur l'injection. Tu sais comment faire le lookup, ou une injection. Je ne sais pas ce que s'est.

  17. #17
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    113
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 113
    Par défaut
    Quand je deploie depuis netBeans voilà ce que j'ai dans ma console
    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
    init:
    deps-module-jar:
    init:
    deps-jar:
    compile:
    library-inclusion-in-archive:
    dist:
    deps-ear-jar:
    deps-jar:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    compile:
    compile-jsps:
    Checking for missing JDBC drivers ...
    Start registering the project's server resources
    Finished registering server resources
    In-place deployment at J:\ProjetPGV\Source\Personne\Personne-war\build\web
    Start registering the project's server resources
    Finished registering server resources
    moduleID=Personne-war
    deployment started : 0%
    Déploiement de l'application dans le domaine a échoué ; Erreur lors du chargement des descripteurs du déploiement pour le module [Personne-war] -- Cannot resolve reference Unresolved Ejb-Ref jsf.PersonneControl/dao@jndi: @null@stateless.PersonneFacadeLocal@Session@null
    Deployment error:
    The module has not been deployed.
    See the server log for details.
            at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166)
            at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
            at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:357)
            at org.apache.tools.ant.Target.performTasks(Target.java:385)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
            at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
            at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
            at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
    Caused by: The module has not been deployed.
            at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:160)
            ... 16 more
    BUILD FAILED (total time: 2 seconds)

Discussions similaires

  1. Trier une liste avec Collections.sort(liste)
    Par nakry dans le forum Collection et Stream
    Réponses: 18
    Dernier message: 25/09/2013, 15h52
  2. Réponses: 0
    Dernier message: 11/11/2011, 20h19
  3. classer une liste avec dates en liste avec périodes
    Par concombre_masqué dans le forum Algorithmes et structures de données
    Réponses: 6
    Dernier message: 21/02/2010, 09h37
  4. [SP-2007] Problème Affichage Liste avec nouveau thème
    Par genzo93 dans le forum SharePoint
    Réponses: 1
    Dernier message: 19/02/2010, 11h02
  5. Tri d'une zone de liste avec origine source : liste valeurs?
    Par electrosat03 dans le forum VBA Access
    Réponses: 1
    Dernier message: 12/05/2009, 21h01

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