Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
1.0.0
-
None
Description
I am using an "AbstractGenericDao" class for all of my DAOs.
In there I use @PersistenceContext(unitName = "myUnit") to inject the EntityManager
The concrete DAO (e.g. EmployeeDao (which extends AbstractGenericDao)) is inject (via @Inject) to a Service IMPL.
Now, when executing some logic on that DAO, where it delegates to the EntityManager (e.g. em.persist(...) I am getting a NullPointerException, indicating that the EntityManager is NULL