Everything was working good until yesterday when ALL my 3 apps started giving me exceptions:
play.exceptions.JPAException: The JPA context is not initialized. JPA Entity Manager automatically start when one or more classes annotated with the @javax.persistence.Entity annotation are found in the application.
at play.db.jpa.JPA.get(JPA.java:22)
at play.db.jpa.JPA.em(JPA.java:51)
at play.db.jpa.JPABase.em(JPABase.java:217)
at controllers.AdmEmailController.index(AdmEmailController.java:25)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:557)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:508)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
at Invocation.HTTP Request(Play!)
At first I though it was my mistake and then after investigating a lot I found this is happening every time I try to access my data base like:
EntityManager em = IngredientApi.em();
Query query = em.createNamedQuery(IngredientApi.NQ_GET_LIST_INGREDIENT);
OR this:
Query query = ConfigWeeklyEmail.em().createNamedQuery(ConfigWeeklyEmail.NQ_GET_LIST_TO_SEND);
I really need a light on this, can you point me any direction?
Thank you.