I was having problems just like yours.
I started browsing through the JBoss code to determine how that SQL was being generated (isn't open source WONDERFUL?). The symptom is caused by JBoss believing that the table has no primary key fields.
Well, I double-checked my code and determined that I had XDoclet "ejb.pk-field" tags on both of my key fields. When I look a little farther, though, I also noticed that I had accidentally left a "ejb.pk" tag which set the class of the PK to Integer in the code. Taking the latter tag out of the source cured the problem.
Digging a little deeper, here is what the inclusion of that tag did to the XML: It changed the value of the <prim-key-class> attribute of the bean definition in the deployment descriptor.