Hi,
this is not a qualified response. I am also only a new user to
glassfish/toplink. Resource injection usually doesn't work for me in toplink
aswell.
You might want to use:
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("persistenceunit-name");
em = emf.createEntityManager();
- Klaus
On Tuesday 06 November 2007 21:47:41 edu53 wrote:
> Hi,
> I'm new using JPA (GlassFish V2 Server, TopLinks, NetBeans IDE) and have
> the following problem:
> In a managed bean that uses resource injection, i.e
>
> @PersistentContext
> private EntityManager em;
>
> When calling em.persist(entity) always get a
> java.lang.NullPointerException, no matter what entity trying to persist.
> I'm not sure if resource injection is working.
>
>
> Somebody can help ?
> Thanks in advance