Thankyou I now have it working fine when using DB2 8.0 on Windows 2000, however when I run it on the DB2 7.2 on OS390 I get the following exception.
I have tried both the DB2Dialect and DB2400 dialect as suggested in the following post.
http://www.hibernate.org/80.185.html
Using the hibernate.properties file
hibernate.dialect=net.sf.hibernate.dialect.DB2400Dialect
[4/6/04 18:40:13:332 GMT+05:30] 32ee7cb2 SystemOut O Hibernate: insert into GCDEV.f42 (ADDRESS_1, ADDRESS_2, ADDRESS_3, ADDRESS_4, CONTACT, NAME, PHONE_NO, LAST_UP_TAD, EXEC_BRK_CODE) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
[4/6/04 18:40:14:442 GMT+05:30] 32ee7cb2 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -804, SQLState: 07002
[4/6/04 18:40:14:442 GMT+05:30] 32ee7cb2 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver][DB2] SQL0804N The application program input parameters for the current request are not valid. Reason code "103". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "2", SQLTYPE = "453", SQLLEN = "0", host variable/SQLVAR type = "INPUT". SQLSTATE=07002
[4/6/04 18:40:14:442 GMT+05:30] 32ee7cb2 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter could not insert: [com.mbl.gcs.staticdata.execbroker.hibernate.F42#ABY]
[4/6/04 18:40:14:442 GMT+05:30] 32ee7cb2 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0804N The application program input parameters for the current request are not valid. Reason code "103". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "2", SQLTYPE = "453", SQLLEN = "0", host variable/SQLVAR type = "INPUT". SQLSTATE=07002