[jboss-user] [JBoss Seam] - Can not inject Seam components into other components

grettke_spdr do-not-reply at jboss.com
Fri May 25 17:25:06 EDT 2007


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048794#4048794

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048794



More information about the jboss-user mailing list