If the primary key column value is obtained from a sequence, then the sequence is apparently not aligned with the actual primary key data in your database. You will need to performa "select seq.nextval from dual" until it reaches the current maximum primary key value.