Foreign key fields are not generated with a "not null" constraint. What database are you using? It may be assuming that fks should be not null. Are you allowing JBoss to generate the tables for you.
I have run into a problem where the tables that JBoss generates use "not null" fields for foreign key fields. When I edit the database manually to allow null fields, everything works like a charm. Am I screwing up the configuration somewhere?
Sybase 12.5 (jConnect 5.5 JDBC Driver)
sybase-service.xml file provided in docs/examples/jca