[jboss-user] [JBoss Seam] - EntityManager always Null (Using Jboss, Seam)

lara do-not-reply at jboss.com
Fri Nov 10 05:10:33 EST 2006


I have a method in a class and inside that method I am trying to access the database by using the EntiyManager. I declared the following:
	@In(create=true)
	private EntityManager entityManager;
I am always getting a NullPointerException when I try printing the value entityManager inside the method, I mean that the value is null for entityManager.
In this class, no annotations are specified whether stateful or stateless, no scope is specified. Does this matter to access the EntityManager?  I made sure of the persistence.xml and it is correct. So what could the problem be? It seems the injection is not working. Any help would be highly appreciated. Thanks in advance!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984838#3984838

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984838



More information about the jboss-user mailing list