2 Replies Latest reply on Jul 9, 2003 4:13 AM by viz

    Bug, Feature or Me?

    viz Newbie

      I have a table in mySQL which does auto_increment

      I have a customer EJB which works with this: in the
      ejbCreate() method I do not call setId(). The row is created, everything is fine.

      However, in testing I have found that if I do not call setId() within the ejbCreate() method (not called because the id column is auto_increment), the following code:

      CustomerRemote customer = (CustomerRemote)home.create();

      throws an error:

      java.lang.IllegalArgumentException: Attempt to get lock ref with a null object

      The error is thrown when remove() is called.

      If the Bean is modified to take an Integer id and setId() called:

      CustomerRemote customer = (CustomerRemote)home.create( new Integer(11) );

      then the code works?

      This seems like a bug to me, but, being new to EJB's and JBoss this could be me - hence the subject line :-)

      Any help appreciated.

      Kind regards,