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 :

Le page ne se charge pas


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éprouvé
    Avatar de stc074
    Homme Profil pro
    Codeur du dimanche
    Inscrit en
    Janvier 2009
    Messages
    1 015
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Lozère (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Codeur du dimanche

    Informations forums :
    Inscription : Janvier 2009
    Messages : 1 015
    Billets dans le blog
    1
    Par défaut Le page ne se charge pas
    Bonjour, j'ai remarqué que certaines de mes pages de mon projet JSF ne se chargeaientt pas, il s'agit de facelets contenant des instructions JSF, j'ai pu voir dans les logs apparemment tomcat n'arrive pas à charger un composant, mais je ne voit pas l'origine du problème, voici une partie de mes logs :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    janv. 15, 2013 2:38:10 PM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already.  Could not load javax.faces.component.html.HtmlMessage.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
    lors d'un 2° essaie cette erreur apparaît :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    janv. 15, 2013 3:03:28 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    SEVERE: The web application [/site] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
    Peut être est-ce une erreur courante, merci pour votre aide.

  2. #2
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Le premier message te dit en gros "l'application est déjà arrêtée, donc je ne peux rien charger de plus", ce qui est normal

    Le deuxième message te dit "t'as une requête qui met un temps dingue à se finir", ce qui est moins normal et mérite que tu détermine quelle requête.

    Dans tous les cas, ton application est "arrêtée", ca n'a donc pas de sens d'essayer d'afficher de nouvelles pages. Si tu n'a pas demandé cette arrêt, inspecte tes logs pour savoir pourquoi elle est arrêtée.

  3. #3
    Membre éprouvé
    Avatar de stc074
    Homme Profil pro
    Codeur du dimanche
    Inscrit en
    Janvier 2009
    Messages
    1 015
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Lozère (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Codeur du dimanche

    Informations forums :
    Inscription : Janvier 2009
    Messages : 1 015
    Billets dans le blog
    1
    Par défaut
    Je ne comprend pas je fais rien de particulier dans ma facelet, j'ai eu de nouveau messages dans les logs :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    SEVERE: The web application [/site] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
    janv. 15, 2013 4:44:07 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [/site] created a ThreadLocal with key of type [javax.faces.context.FacesContext$1] (value [javax.faces.context.FacesContext$1@17b73e8]) and a value of type [com.sun.faces.context.FacesContextImpl] (value [com.sun.faces.context.FacesContextImpl@1f6a6f4]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    janv. 15, 2013 4:44:07 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [/site] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4b0d5d]) and a value of type [com.sun.faces.context.FacesContextImpl] (value [com.sun.faces.context.FacesContextImpl@1f6a6f4]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    janv. 15, 2013 4:44:07 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [/site] created a ThreadLocal with key of type [com.sun.faces.application.ApplicationAssociate$1] (value [com.sun.faces.application.ApplicationAssociate$1@15a8c36]) and a value of type [com.sun.faces.application.ApplicationAssociate] (value [com.sun.faces.application.ApplicationAssociate@173ddcd]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    et voici la facelet que j'inclus a ma page contact :
    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
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:f="http://java.sun.com/jsf/core">
        <h:head>
            <title>Facelet Title</title>
        </h:head>
        <h:body>
            <ui:composition>
                <div class="box">
                    <h2>Contact</h2>
                    <p>Pour nous contacter veuillez utilisez le formulaire ci-dessous.</p>
                    <c:if test="${contactManagedBean.test==1}">
                        <div class="info">
                            <p>Message envoyé !</p>
                        </div>
                        <p></p>
                    </c:if>
                    <c:if test="${contactManagedBean.test==2}">
                        <div class="error">
                            <p>Erreur lors de l'envoi :</p>
                            <p><h:outputText value="#{contactManagedBean.errorMsg}" /></p>
                        </div>
                        <p></p>
                    </c:if>
                     <h:form>
                         <h:panelGrid columns="3">
                             <h:outputLabel for="nom">Votre nom : </h:outputLabel>
                             <h:inputText id="nom" value="#{contactManagedBean.nom}" required="true" requiredMessage="Champ NOM vide" size="30"  maxlength="100">
                                 <f:validator validatorId="nomValidator" />
                             </h:inputText>
                             <h:message for="nom" class="red" />
                             <h:outputLabel for="prenom">Votre prénom : </h:outputLabel>
                             <h:inputText  id="prenom" size="30" value="#{contactManagedBean.prenom}" required="true" requiredMessage="Champ PRÉNOM vide." maxlength="100">
                                 <f:validator validatorId="prenomValidator" />
                             </h:inputText>
                             <h:message for="prenom" class="red"/>
                             <h:outputLabel for="email">Votre adress email : </h:outputLabel>
                             <h:inputText  id="email" size="30" value="#{contactManagedBean.email}" required="true" requiredMessage="Champ ADRESSE MAIL vide." maxlength="100">
                                 <f:validator validatorId="emailValidator" />
                             </h:inputText>
                             <h:message for="email" class="red"/>
                             <h:outputLabel for="object">Objet de votre message : </h:outputLabel>
                             <h:inputText  id="object" size="50" value="#{contactManagedBean.object}" required="true" requiredMessage="Champ OBJET DU MESSAGE vide." maxlength="100">
                                 <f:validator validatorId="objectValidator" />
                             </h:inputText>
                             <h:message for="object" class="red"/>
                             <h:outputLabel for="content">Votre message : </h:outputLabel>
                             <h:inputTextarea id="content" cols="50" rows="10" value="#{contactManagedBean.content}" required="true" requiredMessage="Champ CONTENU DU MESSAGE vide.">
                                 <f:validator validatorId="contentValidator" />
                             </h:inputTextarea>
                             <h:message for="content" class="red"/>
                             <h:commandButton value="Envoyer" action="#{contactManagedBean.sendMessage}"/>
                         </h:panelGrid>
                    </h:form>
                </div>
            </ui:composition>
        </h:body>
    </html>
    Merci !

  4. #4
    Membre éprouvé
    Avatar de stc074
    Homme Profil pro
    Codeur du dimanche
    Inscrit en
    Janvier 2009
    Messages
    1 015
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Lozère (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Codeur du dimanche

    Informations forums :
    Inscription : Janvier 2009
    Messages : 1 015
    Billets dans le blog
    1
    Par défaut
    J'ai l'impression que mon problème vient du ManagedBean que j'utilise dans ma facelet (ContactManagedBean).
    J'ai fait un petit test j'ai mis une division par zéro dans le constructeur de ContactManagedBean et quand je clique sur contact l'erreur apparaît immédiatement, si j'enlève le code foireux ça mouline sans arrêt (sans que j'ai accès à ma page).
    Voici le code de ContactManagedBean :
    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
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
     
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package beans;
     
    import classes.Datas;
    import classes.Objet;
    import classes.SendMail;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.RequestScoped;
     
    /**
     *
     * @author FS-ESPRIMO
     */
    @ManagedBean
    @RequestScoped
    public class ContactManagedBean extends Objet {
     
        private String nom="";
        private String prenom="";
        private String email="";
        private String object="";
        private String content="";
        private String captcha="";
     
        public ContactManagedBean() {
        }
     
        public void sendMessage() {
            SendMail mail=new SendMail(email, Datas.EMAIL_ADMINSTRATOR);
            if(!empty(mail.getErrorMsg())) {
                errorMsg+=mail.getErrorMsg();
                test=2;
            }
            mail.setFirstname(prenom);
            mail.setLastName(nom);
            mail.setObject(object);
            mail.setContent(content);
            mail.send();
            if(empty(mail.getErrorMsg())) {
                blank();
                test=1;
            } else {
                errorMsg+=mail.getErrorMsg();
                test=2;
            }
        }
     
        @Override
        protected void blank() {
            super.blank();
            nom="";
            prenom="";
            email="";
            object="";
            content="";
            captcha="";
        }
     
        /**
         * @return the nom
         */
        public String getNom() {
            return nom;
        }
     
        /**
         * @param nom the nom to set
         */
        public void setNom(String nom) {
            this.nom = nom;
        }
     
        /**
         * @return the prenom
         */
        public String getPrenom() {
            return prenom;
        }
     
        /**
         * @param prenom the prenom to set
         */
        public void setPrenom(String prenom) {
            this.prenom = prenom;
        }
     
        /**
         * @return the object
         */
        public String getObject() {
            return object;
        }
     
        /**
         * @param object the object to set
         */
        public void setObject(String object) {
            this.object = object;
        }
     
        /**
         * @return the content
         */
        public String getContent() {
            return content;
        }
     
        /**
         * @param content the content to set
         */
        public void setContent(String content) {
            this.content = content;
        }
     
        /**
         * @return the captcha
         */
        public String getCaptcha() {
            return captcha;
        }
     
        /**
         * @param captcha the captcha to set
         */
        public void setCaptcha(String captcha) {
            this.captcha = captcha;
        }
     
        /**
         * @return the email
         */
        public String getEmail() {
            return email;
        }
     
        /**
         * @param email the email to set
         */
        public void setEmail(String email) {
            this.email = email;
        }
     
    }
    Merci

  5. #5
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Si tu veux voir où ça mouline, un simple kill -3 sur le serveur ou, si tu as démarré en debug dans eclipse, un clic sur le bouton pause.

  6. #6
    Membre éprouvé
    Avatar de stc074
    Homme Profil pro
    Codeur du dimanche
    Inscrit en
    Janvier 2009
    Messages
    1 015
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Lozère (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Codeur du dimanche

    Informations forums :
    Inscription : Janvier 2009
    Messages : 1 015
    Billets dans le blog
    1
    Par défaut
    J'ai finalement trouvé d’où venait mon bug, d'une DataResource se connectant à ma base de données, le nombre maximum de connections était trop faible du coup ça moulinait.

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

Discussions similaires

  1. SWT Browser comment savoir si la page ne se charge pas
    Par solika dans le forum SWT/JFace
    Réponses: 0
    Dernier message: 01/06/2012, 15h10
  2. Réponses: 0
    Dernier message: 17/04/2011, 17h15
  3. page js qui ne se charge pas.
    Par kiemtso dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 15/08/2009, 20h46
  4. [EasyPHP] les page web ne se charge pas
    Par morpheus007 dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 1
    Dernier message: 13/06/2007, 11h22

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