I have a simple CMP Entity bean in jBoss 3.0.6. It contains two fields, the username and their role. The table contains the same two fields. I have sucessfully used the findAll() method to retrieve all of the objects from the database. When I go to create new row, the database throws an exception about the username field not allowing nulls. I've turned on debugging, and the SQL generated by jBoss appears correct. It is using a PreparedStatement of the form:
INSERT INTO user_table VALUES (?, ?)
It appears that jBoss is not sending the parameters correctly. I am using Sybase ASE 12.5. I also generated all of the EJB code via XDoclet. Is there anything I need to do to get jBoss to work with Sybase ASE? Has anyone seen this?
Any help greatly appreciated!!
Solved my problem. Apparently, XDoclet, when generating the Data Object for the Entity Bean, does not have the saveData() method of the CMP implementation set the primary key. Thus, the ejbCreate() method that uses the DataObject is useless when creating an new Entity.