2 Replies Latest reply on May 29, 2007 7:56 PM by Grant Rettke

    Can not inject Seam components into other components

    Grant Rettke Novice

      Hi folks,

      Can't seem to inject Seam components into other Seam components. Here are the details

      public interface PartyService {
       List<PartyDTO> queryOnCommonAddress(String name,
       String houseNumber,
       String street,
       String city,
       String region,
       String postalCode,
       String subRegion);
      }
      


      @Name("partyService")
      @Scope(ScopeType.STATELESS)
      public class PartyServiceImpl implements PartyService {
      
       @Logger
       private Log log;
      
       @PersistenceContext
       EntityManager em;
      
       public List<PartyDTO> queryOnCommonAddress(String name,
       String houseNumber,
       String street,
       String city,
       String region,
       String postalCode,
       String subRegion) {
       log.debug("Entering PartyServiceImpl.queryOnCommonAddress");
       log.debug("Exiting PartyServiceImpl.queryOnCommonAddress");
       return new ArrayList<PartyDTO>();
       }
      }
      


      @Stateful
      @Name("populateData")
      public class PopulateDataImpl implements PopulateData{
      
       @Logger
       private Log log;
      
       @PersistenceContext
       EntityManager em;
      
       @In
       PartyService partyService;
      
      ...
      


      java.lang.RuntimeException: Could not create Component: partyService
       at org.jboss.seam.init.Initialization.addComponent(Initialization.java:
      65)
       at org.jboss.seam.init.Initialization.installComponents(Initialization.
      ava:796)
      


      What am I doing wrong?