i have a cmp entity bean for one simple table tab_test (oracle9i).
CREATE TABLE TAB_TEST( ID NUMBER NULL, INSERT_DATE DATE DEFAULT sysdate NOT NULL ); ALTER TABLE TAB_TEST ADD ( PRIMARY KEY (ID));
13:19:22,698 INFO [STDOUT] javax.ejb.CreateException: Could not create entity:java.sql.SQLException: ORA-01400: cannot insert NULL into ("TEST"."TAB_TEST"."INSERT_DATE")
The default value is used, if you don't give a value for the column in the insert statement.
But NULL is take as a value for the column and the insert is rejected because null is not allowed.