5 Replies Latest reply on Nov 3, 2003 7:25 AM by Juha Lindfors

    (CMP) Error trying to run methods after creation

    nashbr Newbie

      nat is CMP bean
      In client I write:

      .....
      nat = natHome.create(bla,bla,bla);
      ....

      And the new row in table "nat" creates.
      But when I write

      .....
      nat = natHome.create(bla,bla,bla);
      nat.getName();//or any method of nat
      ....

      Then this makes an Exception, that I can see in JBoss log:
      "java.lang....Exception
      Trying to get ref on a null object"
      but (nat!=null) and (nat.equals(null)!=true).
      What I'm doing wrong?