Announcement Announcement Module
Collapse
No announcement yet.
Ejb injection issue in Spring Service Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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
    -------------------
    @Service
    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
    ear
    ------>application.war
    ------>meta.inf
    ------>ejbEntities.jar (my UserDAO exists here)
    ------>lib
    Last edited by deepakdogra; Jun 29th, 2010, 06:35 AM. Reason: Mistake
Working...
X