What a strange error message. The EJB spec requires that you return null from ejbCreate in this case. Change that last line to "return null". I suspect that the container is getting confused by you returning a non-null value.
Originally posted by Suneesh VR:
javax.ejb.EJBException: Null primary key returned by ejbCreate method