[jboss-user] [EJB 3.0] - Re: Error Injecting EntityManager

sonstone do-not-reply at jboss.com
Tue Nov 6 13:34:33 EST 2007


I was getting this error and I did two things and the problem went away.

1) - I was using @PersistenceUnit annotation for whatever reason so I switched it to use @PersitenceContext

2) - I had the entity manager field private with a public getter and protected setter.  I had problems until I made both accessors public.  I'm not sure if I had made them both protected or removed them period if I would have had the same problem.

Hope this helps.

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

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



More information about the jboss-user mailing list