Dinesh - 2015-02-11

Hi!!

I am a newbie to RestFul Webservice. I have tried to create a simple RestFul WebService in Netbeans IDE by using Jersey (JAX-RS API). While running the webservices client, i am getting NullpointerException.

And found that, the error occurs due to getEntityManager() return null in the below code.

javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();

Kindly suggest any ideas to resolve this issue.

Thanks in advance.