0 Replies Latest reply on Jan 11, 2012 10:16 AM by Sascha Möllering

    Arquillian, JBoss 7 and Injection

    Sascha Möllering Newbie

      Hello,

       

       

       

      I've problems with Arquillian, JBoss 7 and injection of components in my test:

       

      1) If my ApplicationTestDao extends an abstract class, in my arquillian-test-class, the EJB-reference is null and the injected PersistenceContext is null:

       

      @EJB

      private ApplicationTestDao dao;

       

      -> dao is null

       

      @PersistenceContext(unitName = "FooBar")

      private org.hibernate.Session session;

       

      -> session is null

       

       

      2) If my ApplicationTestDao does not extend an abstract class, the EJB-reference is ok, but the injected PersistenceContext is still null:

       

      @PersistenceContext(unitName = "FooBar")

      private org.hibernate.Session session;

       

      -> session is null

       

      Do you have any ideas?

       

      Regards,

      Sascha