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

Seam Java Discussion :

Seam component not found


Sujet :

Seam Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 5
    Points : 8
    Points
    8
    Par défaut Seam component not found
    Bonjour,

    J'ai un probleme avec Seam, je n'arrive pas à effectuer l'injection de dépendance avec seam. Je m'explique quand je lance mon projet dans les logs j'ai ceci:
    17:08:08,303 DEBUG [Component] seam component not found: user
    17:08:08,303 DEBUG [Component] seam component not found: org.jboss.seam.core.user
    17:08:08,303 DEBUG [Component] seam component not found: org.jboss.seam.transaction.user
    17:08:08,303 DEBUG [Component] seam component not found: org.jboss.seam.framework.user
    17:08:08,303 DEBUG [Component] seam component not found: org.jboss.seam.web.user
    17:08:08,303 DEBUG [Component] seam component not found: org.jboss.seam.faces.user
    17:08:08,303 DEBUG [Component] seam component not found: org.jboss.seam.international.user
    17:08:08,304 DEBUG [Component] seam component not found: org.jboss.seam.theme.user
    17:08:08,304 DEBUG [Component] seam component not found: org.jboss.seam.pageflow.user
    17:08:08,304 DEBUG [Component] seam component not found: org.jboss.seam.bpm.user
    "user" étant le bean que j'aimerais injecter dans ma page JSF. Et j'ai cette erreur avec toutes les EL que j'utilise dans ma page.

    Mon action Identify:
    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
    package net.projetgl.actions;
     
    import net.projetgl.daos.interfaces.UserDao;
    import net.projetgl.domaine.User;
    import net.projetgl.services.interfaces.UserService;
     
    import org.jboss.seam.annotations.In;
    import org.jboss.seam.annotations.Name;
    import org.jboss.seam.annotations.Out;
     
     
    @Name("identify")
    public class Identify {
    	@In @Out
    	private String login;
    	@In
    	private String mdp;
    	@In
    	private UserService userService;
    	@In
    	private UserDao userDao;
    	@In @Out
    	private User user;
    	private boolean logged=false;
     
    	public Identify(){;}
     
    	public String ident(){
    		String encode = userService.encodeMDP(mdp);
    		if(encode.equals(userDao.getMDP(login))){
    			user = userDao.getUser(login);
    			logged=true;
    			return "/home.xhtml";
    		}
    		else
    			return "/login.xhtml";
    	}
     
    	public String register(){
    		if(user.getMdp().equals(mdp)){
    			userDao.save(user);
    			return "/home.xhtml";
    		}
    		else 
    			return "/register.xhtml";
    	}
     
    	public Boolean isLogged(){
    		return this.logged;
    	}
     
     
    }
    Le bean User :
    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
    package net.projetgl.domaine;
     
    import javax.persistence.Table;
     
    import org.hibernate.annotations.Entity;
    import org.jboss.seam.ScopeType;
    import org.jboss.seam.annotations.Name;
    import org.jboss.seam.annotations.Scope;
     
    @Entity
    @Name("user")
    @Table(name="UTILISATEURS")
    public class User {
    	private String name;
    	private String firstname;
    	private String login;
    	private String mdp;
    	private String email;
    	private Character chara;
    	private Boolean admin;
     
    	public User() {
    	}
     
    	public User(String email, String login, String mdp, Character perso) {
    		this.email = email;
    		this.login = login;
    		this.mdp = mdp;
    		this.chara = perso;
    	}
     
    	/**
             * @return the login
             */
    	public String getLogin() {
    		return login;
    	}
     
    	/**
             * @param login the login to set
             */
    	public void setLogin(String login) {
    		this.login = login;
    	}
     
    	/**
             * @return the mdp
             */
    	public String getMdp() {
    		return mdp;
    	}
     
    	/**
             * @param mdp the mdp to set
             */
    	public void setMdp(String mdp) {
    		this.mdp = mdp;
    	}
     
    	/**
             * @return the email
             */
    	public String getEmail() {
    		return email;
    	}
     
    	/**
             * @param email the email to set
             */
    	public void setEmail(String email) {
    		this.email = email;
    	}
     
    	/**
             * @return the chara
             */
    	public Character getChara() {
    		return chara;
    	}
     
    	/**
             * @param chara the chara to set
             */
    	public void setChara(Character chara) {
    		this.chara = chara;
    	}
     
    	/**
             * @return the admin
             */
    	public Boolean isAdmin() {
    		return admin;
    	}
     
    	/**
             * @param admin the admin to set
             */
    	public void setAdmin(Boolean admin) {
    		this.admin = admin;
    	}
     
    	/**
             * @return the name
             */
    	public String getName() {
    		return name;
    	}
     
    	/**
             * @param name the name to set
             */
    	public void setName(String name) {
    		this.name = name;
    	}
     
    	/**
             * @return the firstname
             */
    	public String getFirstname() {
    		return firstname;
    	}
     
    	/**
             * @param firstname the firstname to set
             */
    	public void setFirstname(String firstname) {
    		this.firstname = firstname;
    	}
     
    }
    Le bout de page qui provoque l'erreur:
    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
     
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    	    		xmlns:ui="http://java.sun.com/jsf/facelets"
    	  			xmlns:h="http://java.sun.com/jsf/html"
    	  			xmlns:f="http://java.sun.com/jsf/core"
    	  			xmlns:s="http://jboss.com/products/seam/taglib"
                                    xmlns:a="http://richfaces.org/a4j"
                                    xmlns:rich="http://richfaces.org/rich"
    				template="/layout/template.xhtml">
    <rich:toolBar >
        <rich:toolBarGroup >
            <h:outputText value="#{projectName}:"/>
            <h:outputText value="Bienvenue, #{user.login}" rendered="#{identify.isLogged}"/>
        </rich:toolBarGroup>
        <rich:toolBarGroup location="center" >
            <s:link view="/login.xhtml" value="S'identifier" rendered="#{not identify.isLogged}"/>
            <s:link view="/home.xhtml" value="Acceuil"/>
            <s:link view="/register.xhtml" value ="Creer un compte"/>
            <s:link view ="/administration.xhtml" value ="Administration" rendered="#{user.isAdmin}"/>
            <s:link view="/home.xhtml" value="Deconnexion" action="#{identify.logout}" rendered="#{identify.isLogged}"/>
        </rich:toolBarGroup>
    </rich:toolBar>
    <ui:define name="contenu">			
    	<rich:panel styleClass="wizard">
    		<f:facet name="header">
    			<s:formattedText value="Formulaire d'enregistrement" />
    			</f:facet>
    			<h:form>
    				<h:outputText value="Pseudo"/><br/>
    		                <h:inputText value="#{user.login}" /><br/>
    		                <h:outputText value="Tapez votre mot de passe" /><br/>
    		                <h:inputSecret value="#{user.mdp}" /><br/>
    		                <h:outputText value="Retapez votre mot de passe" /><br/>
    		                <h:inputSecret value="#{mdp}" /><br/><br/>
    		                <a:commandButton value="Suivant &gt;" action="next" />
    			</h:form>
    		</rich:panel>
    	</ui:define>
    </ui:composition>
    Et voici l'exception levée quand je clique sur suivant:
    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
    17:20:28,365 ERROR [ExceptionFilter] handling uncaught exception
    javax.servlet.ServletException: /register.xhtml @9,40 value="#{user.login}": Target Unreachable, identifier 'user' resolved to null
    	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
    	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
    	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
    	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
    	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:175)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    	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:263)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Thread.java:613)
    Caused by: javax.el.PropertyNotFoundException: /register-1.xhtml @9,40 value="#{user.login}": Target Unreachable, identifier 'user' resolved to null
    	at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
    	at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:81)
    	at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
    	at javax.faces.component.UIInput.validate(UIInput.java:860)
    	at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
    	at javax.faces.component.UIInput.processValidators(UIInput.java:666)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at org.ajax4jsf.component.UIInclude.processValidators(UIInclude.java:175)
    	at javax.faces.component.UIForm.processValidators(UIForm.java:229)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
    	at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
    	at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
    	at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
    	at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
    	at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
    	at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
    	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)
    	... 29 more
    17:20:28,367 ERROR [ExceptionFilter] exception root cause
    javax.el.PropertyNotFoundException: /register-1.xhtml @9,40 value="#{user.login}": Target Unreachable, identifier 'user' resolved to null
    	at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
    	at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:81)
    	at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
    	at javax.faces.component.UIInput.validate(UIInput.java:860)
    	at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
    	at javax.faces.component.UIInput.processValidators(UIInput.java:666)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at org.ajax4jsf.component.UIInclude.processValidators(UIInclude.java:175)
    	at javax.faces.component.UIForm.processValidators(UIForm.java:229)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
    	at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
    	at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
    	at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
    	at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
    	at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
    	at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
    	at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
    	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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
    	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
    	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
    	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
    	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
    	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:175)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    	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:263)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Thread.java:613)
    Voilà si quelqu'un peut m'aider je suis preneur merci

  2. #2
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    19
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 19
    Points : 23
    Points
    23
    Par défaut
    Peux tu poster le contenu de ton component.xml ainsi que l'arborescence des fichiers réellement déployés sur le serveur.

    Ton projet est il packagé à la main, par seam-gen, jboss-tools ?

Discussions similaires

  1. Réponses: 1
    Dernier message: 22/01/2009, 18h36
  2. Could not instantiate Seam component:
    Par gl0be dans le forum Seam
    Réponses: 2
    Dernier message: 13/01/2009, 17h09
  3. Mapping Exception : component class not found
    Par lion13 dans le forum Hibernate
    Réponses: 2
    Dernier message: 06/05/2008, 14h30
  4. Connexion IRport et Hibernate (component class not found)
    Par imad.elghazoini dans le forum iReport
    Réponses: 4
    Dernier message: 29/06/2007, 11h51
  5. Component not found
    Par Pm dans le forum XMLRAD
    Réponses: 2
    Dernier message: 28/01/2003, 14h40

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