prob d'authentification

prob d'authentification - Java - Programmation

Marsh Posté le 30-05-2010 à 19:33:55    

bonjour,
je développe une application web avec jsf ,richfaces , hibernate et spring avec l'éditeur netbeans et serveur apache tomcat et j'ai rencontré l'erreur NullPointerException  lorsque je veux se connecter en entrant les login et password et appyant sur mon bouton connexion  

Citation :

 <rich:panel  id="logpan"   style="background-image:url(#{facesContext.externalContext.requestContextPath}/images/Authentif.png);background-repeat:no-repeat;background-position:-35px-15px;"header="Authentification" styleClass="panel_3">
               
                    <h:outputText value="login:"/>
                    <h:inputText   id="log"  value="#{AuthentificationBean.login}"  required="true" requiredMessage="champs obligatoire"/>
                    <rich:message for="log" style="color: red"/>
                    <h:outputText value="Password:"/>
                    <h:inputSecret id="mdp"  value="#{AuthentificationBean.password}"  required="true" requiredMessage="champs obligatoire"/>
                    <rich:message for="mdp" style="color: red"/>  
                 <rich:spacer height="20px"></rich:spacer>
 
                 <a4j:commandButton  value="connexion" action="#{AuthentificationBean.connecter}"  >
                     
                 </a4j:commandButton>


et voilà l'erreur :

Citation :

Hibernate: select utilisateu0_.id_user as id1_9_, utilisateu0_.login as login9_, utilisateu0_.pwd as pwd9_, utilisateu0_.nom as nom9_, utilisateu0_.prenom as prenom9_, utilisateu0_.adresse as adresse9_, utilisateu0_.date_naissance as date7_9_, utilisateu0_.tel as tel9_, utilisateu0_.mail as mail9_, utilisateu0_.droit as droit9_ from bd_pfe.utilisateur utilisateu0_ where utilisateu0_.login='null' and utilisateu0_.pwd='null'
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at implementation.dao.AuthentificationDaoImpl.findByLoginAndPassword(AuthentificationDaoImpl.java:23)
        at implementation.service.AuthentificationServiceImpl.findByLoginAndPassword(AuthentificationServiceImpl.java:21)
        at Beans.AuthentificationBean.connecter(AuthentificationBean.java:68)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
        at javax.faces.component.UICommand.broadcast(UICommand.java:383)
        at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
        at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:324)
        at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:299)
        at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:256)
        at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:469)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
        at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
        at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)


 
 
svp  :hello: j'attends vos aides  :hello:  :hello:  
 

Reply

Marsh Posté le 30-05-2010 à 19:33:55   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed