0 Replies Latest reply on Mar 26, 2013 7:38 AM by gunnarbos

    @Inject returns null in war

    gunnarbos

      Hi

      I'm trying to convert a JBoss 5.1 application to JBoss 7.1.3

       

      I have an ear file with one war and several ear modules.

      I try to Inject a stateless session bean in a web action but it is always null

       

      In my Web Action class I have

      @javax.inject.Inject

                private UserManager theUserManager;

       

      My Stateless EJB

      @avax.ejb.Stateless

      public class UserManagerBean implements UserManager {

       

      I added DEBUG to org.jboss.weld so I can see that weld detects both classes but the userManger is always null.

       

      What am I doing wrong?

       

      /Gunnar