change the embeddable's id column name. keep in mind that there is only one table for 2 classes.
PS there are 2 id fields, one in Car and other in CarPK, correct that by changing one of column name. I hope you no need id field in Car class since it already in CarPK [ November 16, 2008: Message edited by: Chaminda Amarasinghe ]
I agree with Chaminda. It's not even a duplicate insert. I think that the logged error message is explicit enough : Column name 'ID' appears more than once times in the column list of an INSERT statement. Call: INSERT INTO CAR (STEERING, CHASIS, ID, HORN, ID, STEERING, CHASIS, HORN, CITY, STATE, STREETLINE2, ZIPCODE, STREETLINE1, COUNTRY).
Same for steering, chasis and horn. [ November 16, 2008: Message edited by: Christophe Verre ]
No, it means that you must not have the same fields both in the entity and in the embedded class. Look at your Car class and your CarPK class. They both have the same fields (horn, id , steering, chasis). Embedded fields must be only in the embedded class.
Did you check your server's log ? You should have something like :
Exception Description: Entity class [class entities.Car] has both an @EmbdeddedId (on attribute [carPK]) and an @Id (on attribute [id]. Both id types cannot be specified on the same entity. -- Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008)))