Announcement Announcement Module
No announcement yet.
Ejb injection issue in Spring Service Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ejb injection issue in Spring Service

    I am trying to inject Ejb into Spring service using the annotations but I am getting the following errors.

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'userProfileServiceBean': Injection of resource fields failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No unique bean of type [com.hnw.campaign.dao.UserDAO] is defined: Unsatisfied dependency of type [interface com.hnw.campaign.dao.UserDAO]: expected at least 1 matching bean

    MY java code is
    public class UserProfileServiceBean implements UserProfileService {
    @EJB UserDAO userDAO;
    public UserProfile getUserProfile(String userId) {
    //System.out.println("Inside user profile service bean *****************************="+userDAO);

    The UserDAO is in the separate jar file ....
    Structure of Ear file is
    ------>ejbEntities.jar (my UserDAO exists here)
    Last edited by deepakdogra; Jun 29th, 2010, 05:35 AM. Reason: Mistake