Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inserting table Record using iBator generated code , sqlerror code -440

 
Asmita Vagyani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 (#cnvcDateATE#, #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 ]
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51453
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Asmee" or whatever, please read the important administrative private message I just sent you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic