Are you using @Column(name="xxx") annotations? I had similar problems when using @ManyToOne annotations and did not declare the column name on both sides. Glassfish/Toplink generates the names for foreign keys by the name of the table and the field. If you override the column name you have to do it on both sides.
[Message sent by forum member 'kurti' (kurti)]
http://forums.java.net/jive/thread.jspa?messageID=274515