I tried using EntityManager to create a query, it throws null pointer exception.
Tried getting entityManager from EntityManagerFactory also null pointer exception, I don't know what's missing, here is my persistence.xml:
And yes it is located in META-INF folder.
Any help please??
Your injection doesn't seem to be the problem, otherwise the NullPointerException would have been caused by your code, but instead it comes from inside the EntityManager.