2 Replies Latest reply on Jan 17, 2006 2:50 AM by chelaru.viorel

    ids for this class must be manually assigned before calling

    chelaru.viorel Newbie

      hi all,
      i' having a problem when i try to persist an UserBean entity bean; i'm doing this:

      UserBean user=new UserBean(name,password,0,email,"MEMBER");
      System.out.println("user loaded");
      System.out.println("before persist");
      emi.persist(user);
      System.out.println("user persisted");

      i've also tried with
      UserBean user=new UserBean();
      user.setUserName(userName);
      ....
      user.setRole("MEMBER");
      System.out.println("user loaded");
      System.out.println("before persist");
      emi.persist(user);
      System.out.println("user persisted");

      it's the same exception :
      ids for this class must be manually assigned before calling save(): vc.ejb.authentication.persistence.UserBean

      what i'm doing wrong ? i saw the example of how persisting an entity from the EJB3TrailBlaizer and i used that example.

      thank,
      chelaru.viorel