| Author |
Inserting table Record using iBator generated code , sqlerror code -440
|
asmee or ask me
Greenhorn
Joined: Dec 19, 2008
Posts: 1
|
|
Hi, I am using WAS 6.0 to deploy my application. Using iBatis for DB interfacing. The query generated by iBator looks like: -------------------------------------------------------------------- <insert id="abatorgenerated_insert" parameterClass="com.avivacanada.ecomm.service.buyautoservice.domain.ActualDriverConviction" > <!-- WARNING - This element is automatically generated by Abator for iBATIS, do not modify. This element was generated on Thu Dec 18 13:35:32 EST 2008. --> insert into TACTL_DRV_CNVC (CNVC_DATE, DRIVER_ID, CONVICTION_TYP_ID, UPDATED_DATE, CNVC_SEVERITY_TYP_ID, MOTOR_VEH_RPT_ID, UPDATED_BY, CREATED_DATE, CREATED_BY) values (#cnvcDate ATE#, #driverId:BIGINT#, #convictionTypId:CHAR#, #updatedDate:TIMESTAMP#, #cnvcSeverityTypId:CHAR#, #motorVehRptId:VARCHAR#, #updatedBy:VARCHAR#, #createdDate:TIMESTAMP#, #createdBy:VARCHAR#) <selectKey resultClass="java.lang.Long" keyProperty="actlDrvCnvcId" > VALUES IDENTITY_VAL_LOCAL() </selectKey> </insert> -------------------------------------------------------------------- while triggering it my record gets inserted , since Autocommit is on, but throws exeption saying : -------------------------------------------------------------------- com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/avivacanada/ecomm/service/buyautoservice/dao/sql/TACTL_DRV_CNVC_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the TACTL_DRV_CNVC.abatorgenerated_insert-SelectKey-InlineParameterMap. --- Check the statement (query failed). --- Cause: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: IDENTITY_VAL_LOCAL;FUNCTION -------------------------------------------------------------------- Anybody has any clue where's the problem? Would really appreciate for your time in giving some pointers here. I checked DB privileges on table, but no clue where it picks up the function IDENTITY_VAL_LOCAL() from. IDENTITY_VAL_LOCAL() function is not there in DB. [ December 19, 2008: Message edited by: asmee or ask me ]
|
Cheers!!<br /> <br />ASmee
|
 |
Paul Campbell
Ranch Hand
Joined: Oct 06, 2007
Posts: 338
|
|
Originally posted by asmee or ask me: -------------------------------------------------------------------- com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/avivacanada/ecomm/service/buyautoservice/dao/sql/TACTL_DRV_CNVC_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the TACTL_DRV_CNVC.abatorgenerated_insert-SelectKey-InlineParameterMap. --- Check the statement (query failed). --- Cause: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: IDENTITY_VAL_LOCAL;FUNCTION -------------------------------------------------------------------- Anybody has any clue where's the problem? Would really appreciate for your time in giving some pointers here. I checked DB privileges on table, but no clue where it picks up the function IDENTITY_VAL_LOCAL() from.
SQLSTATE: 42884 = No routine was found with the specified name and compatible arguments. I don't believe IDENTITY_VAL_LOCAL() exists.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
|
"Asmee" or whatever, please read the important administrative private message I just sent you.
|
 |
 |
|
|
subject: Inserting table Record using iBator generated code , sqlerror code -440
|
|
|