Hi, I am new to hibernate and facing weird problem. When I tried to insert a record into table using hibernateTemplate().save method, getting an error "Cannot insert null into column name..). It is binding values properly. Basically no values are passed to SQL it seems. All configurations seem to be correct. prflHistId and createdBy, and dateCreated are the only required fields. Here is the error I am getting from log.
com.tier.uiConnect.hibernate.ProfileHistoryEO{midNm=null, modifiedBy=null, frstNm=null, faxPhnNo=1112223333, busnNm=First Name, webSiteAddr=www.hotmail.com, createdBy=TEST, dateCreated=2007-05-22 15:06:35, dateModified=null, cellPhnNo=null, emailAddr=dwd@dwd.com, prflHistId=97927, lstNm=null, voidInd=N, priPhnNo=7031112222}
2007-05-22 15:07:48,259 DEBUG WebContainer : 0 org.hibernate.engine.ActionQueue - changes must be flushed to space: PROFILE_HISTORY
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.event.def.DefaultAutoFlushEventListener - Need to execute flush
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.event.def.AbstractFlushingEventListener - executing flush
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.persister.entity.BasicEntityPersister - Inserting entity: [com.tier.uiConnect.hibernate.ProfileHistoryEO#97927]
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.SQL - insert into PROFILE_HISTORY (FRST_NM, MID_NM, LST_NM, BUSN_NM, PRI_PHN_NO, CELL_PHN_NO, FAX_PHN_NO, EMAIL_ADDR, WEB_SITE_ADDR, VOID_IND, CREATED_BY, DATE_CREATED, MODIFIED_BY, DATE_MODIFIED, PRFL_HIST_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.jdbc.AbstractBatcher - preparing statement
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.persister.entity.BasicEntityPersister - Dehydrating entity: [com.tier.uiConnect.hibernate.ProfileHistoryEO#97927]
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding null to parameter: 1
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding null to parameter: 2
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding null to parameter: 3
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding 'First Name' to parameter: 4
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding '7031112222' to parameter: 5
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding null to parameter: 6
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding '1112223333' to parameter: 7
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding
'dwd@dwd.com' to parameter: 8
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding 'www.hotmail.com' to parameter: 9
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.CharacterType - binding 'N' to parameter: 10
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding 'TEST' to parameter: 11
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.TimestampType - binding '2007-05-22 15:06:35' to parameter: 12
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.StringType - binding null to parameter: 13
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.TimestampType - binding null to parameter: 14
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.type.LongType - binding '97927' to parameter: 15
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.jdbc.AbstractBatcher - Adding to batch
2007-05-22 15:07:48,275 DEBUG WebContainer : 0 org.hibernate.jdbc.AbstractBatcher - Executing batch size: 1
2007-05-22 15:07:48,900 DEBUG WebContainer : 0 org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2007-05-22 15:07:48,900 DEBUG WebContainer : 0 org.hibernate.jdbc.AbstractBatcher - closing statement
2007-05-22 15:07:48,916 DEBUG WebContainer : 0 org.hibernate.util.JDBCExceptionReporter - Could not execute JDBC batch update [insert into PROFILE_HISTORY (FRST_NM, MID_NM, LST_NM, BUSN_NM, PRI_PHN_NO, CELL_PHN_NO, FAX_PHN_NO, EMAIL_ADDR, WEB_SITE_ADDR, VOID_IND, CREATED_BY, DATE_CREATED, MODIFIED_BY, DATE_MODIFIED, PRFL_HIST_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("UICONNECT"."PROFILE_HISTORY"."CREATED_BY")
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteBatch(WSJdbcStatement.java:1142)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:485)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:174)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)