6 Replies Latest reply on Jul 26, 2007 12:37 PM by Olivier Thierry

    Problem with injection

    Olivier Thierry Apprentice

      Hi,

      I try to run a Seam application generated from AndroMDA but I have problems with injection. I have a "employeList" Seam component (CONVERSATION scope) which needs anoter Seam component "serviceEmploye" which is a stateless one.

      My injection code is this one :

      /**
       * Inject Seam session bean ServiceEmploye
       */
       @org.jboss.seam.annotations.In (value="serviceEmploye")
       protected fr.xxx.t4.core.employe.ServiceEmployeLocal serviceEmploye;
      


      But the injection does not work :

      Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: employeList.serviceEmploye
       at org.jboss.seam.Component.getInstanceToInject(Component.java:1920)
       at org.jboss.seam.Component.injectFields(Component.java:1386)
       at org.jboss.seam.Component.inject(Component.java:1156)
       at



      ServiceEmploye component is defined this way in components.xml

      <component
       name="serviceEmploye"
       class="fr.horoquartz.t4.core.employe.ServiceEmployeBean"
       scope="STATELESS"
       jndi-name="t4Seam-1.0-SNAPSHOT/ServiceEmployeBean/local"/>
      


      I am a newbie with Seam. I desperately tried to understand what happens, but I still have not found a solution. So any help would be welcome ;)