I am creating a Java EE application using jpa.
I am getting the following error when the code is run on server
[2/25/12 22:56:31:371 IST] 0000004
in such cases make sure you write the@EJB annotation before creating the object of the class containing the entity manager. the reason for the null pointer exception is generally because the entitymanager is not initialised. @EJB annotation does that.
In your case the class where you declare an object of user class write @EJB above it.this should solve the problem.