- 
        1. Re: cannot create an entity bean followed by a getPrimaryKeyjoelvogt Dec 5, 2002 7:23 PM (in response to pcollet)which field have you defined as your pk? Have you made sure this isn't null before the create? 
- 
        2. Re: cannot create an entity bean followed by a getPrimaryKeypcollet Dec 9, 2002 12:01 PM (in response to pcollet)Hi, 
 I'm using an auto-generated key on the table (called uid) so I believe I don't need to specify a value in the ejbCreate() method. Is that right?
 Thanks for your help,
 Pascal
- 
        3. Re: cannot create an entity bean followed by a getPrimaryKeypcollet Dec 9, 2002 12:08 PM (in response to pcollet)I turned on the debug flag and here is the SQL code that is executed before the rollback error: 
 11:10:28,525 DEBUG [MbtPoms] Create: pk=null
 11:10:28,525 DEBUG [MbtPoms] Executing SQL: SELECT COUNT(*) FROM mbt_poms WHERE uid=?
 11:10:28,525 DEBUG [MbtPoms] Executing SQL: INSERT INTO mbt_poms (uid, created, start, stop, subject_uid, visit_uid) VALUES (?, ?, ?, ?, ?, ?)
 11:10:28,541 DEBUG [MbtPoms] Rows affected = 1
 11:10:28,541 ERROR [LogInterceptor] TransactionRolledbackLocalException, causedBy:
 java.lang.IllegalArgumentException: Attempt to remove a lock for a null object
 at org.jboss.ejb.BeanLockManager.removeLockRef(BeanLockManager.java:103)
 at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:124)
 the rest of the execution stack is the same than shown in previous message.
 
    