2 Replies Latest reply on Jun 8, 2007 5:41 AM by Moshe Immerman

    SMPC in a SFSB throws a nullpointer

    Moshe Immerman Newbie

      When injecting the Seam Managed Persistence Context in a Stateful Session bean, it does not get injected and subsequent references to the entityManager throws a NullPointer Exception.

      The below code demonstrated the problem, When @Stateful is removed everything works fine.

      public class Forward implements ForwardLocal{
      private EntityManager em;
       List<User> users;
      public void init() {
      users= em.createQuery(" from User as u").getResultList();