• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
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 (#cnvcDate:DATE#, #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 ]
 
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.
 
Marshal
Posts: 64618
225
  • 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
Boost this thread!