Results 1 to 1 of 1

Thread: Ejb injection issue in Spring Service

Threaded View

  1. #1
    Join Date
    Jun 2010
    Posts
    1

    Exclamation 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 at 05:35 AM. Reason: Mistake

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •