In the class definition you have annotated id to be generated by strategy (table, sequence, etc.) chosen by the persistence provider, but you are initializing the id of the Person object through constructor. I think leaving id null may solve your problem.