When using Websphere 3.5, VisualAge and Oracle to develop CMP EJB's I receive the following error: "Unable to insert data into a NOT NULL field". What am I doing wrong?

Shai Almog

You need to modify the create method for the Entity bean to initialize ALL the not null fields.

VAJ defaults to initializing the primary key but it doesn't initialize the NOT NULL fields, this won't work because any invocation of create() immediately causes insert. Take a look (or debug) the deployed code generated by VAJ to see the generated code that is deployed into the server.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact