The title says it all. I am getting a null pointer when accessing an entity manager from an abstract class. I have an abstract class where I inject an entityManager
private EntityManager entityManager;
I have a getter in this class to expose the entity manager to subclasses. I can call the getter in my concrete class and make use of the entity manager. However when call a function on the abstract class which makes use of the same entity manager I get an NPE
I am guessing this has something to to with how sessions are opened and closed by the proxy. Any help on this would be great.