0 Replies Latest reply on Nov 15, 2005 3:17 AM by trofimov

    Stateful (statless) EJB3 and inheritance

    trofimov

      I create:

      public abstract class GenericEjb3DAO <T, ID extends Serializable> implements GenericDAO<T, ID> {
      
       @PersistenceContext
       public EntityManager em;
      ...
      }

      Then i create:
      @Stateless
      public class UserDAOBean extends GenericEjb3DAO<User, Long> implements UserDAO {
      ..
      
      ..
      }
      

      And when i handle to "em" in first or second class, exception is raised
      "java.lang.NullPointerException".

      When i remove inheritance, all fine. What is wrong in my code?
      Thanx.