This is my wild guess, but I think the Container is keeping track of the Primary Key field. It may have not added the data in your DB table, but JBoss thinks it did and keeps tracks of the primary key sequence. Restart the JBoss server and see if you can re-add the data.
I know this is an old topic, but just incase someone hits it while searching like I did:
This pattern can happen if your deployer (or you) forget to specify the datasource and datasource-mapping in the appropriate file. As most people know JBuilder doesn't have native support for JBoss, though it should - I thought it would specify the datasource in ejb-jars.xml. As it turned out I had to add it (by way of a JBuilder addin or manually) to jbosscmp-jdbc.xml like this:
Prior to adding these two settings I was hitting the default datasource. Didn't take long to catch, but it could at 3 am...
Maybe that will help someone else down the road?