IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Insert VARRAY into Oracle Database using JDBC

  • 1.  Insert VARRAY into Oracle Database using JDBC

    Posted Tue May 17, 2011 01:00 PM

    [SIZE=3]Hi,

    I have created a table with a array column as below.

    [/SIZE] [COLOR=black][FONT=&quot][FONT=Century Gothic][COLOR=Blue]create or replace type vcarray_sec_units as VARRAY(10) of VARCHAR2(50);[/font][/color]

    [FONT=&quot][SIZE=3]create table mw_payload_sec_unit
    (
    internal_id varchar2(70),
    sec_units VCARRAY_SEC_UNITS
    );
    [/size][/font]

    [SIZE=3] Now I wish to insert data into this table using JDBC Adapter service. [/size]

    In the adapter service, the sec_units column appear with JDBC Data Type as “Other” with possible input field type as - java.lang.string, java.lang.object, java.sql.struct & java.sql.array.

    I am using java.lang.object input type and trying to pass string list which is converted to vector using pub.list:addItemToVector

    While trying to insert I get this error -

    [SIZE=3][COLOR=Red]com.wm.app.b2b.server.ServiceException: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service Default:insertSimpleArray.
    [ADA.1.316] Cannot execute the SQL statement “INSERT INTO MW_PAYLOAD_SEC_UNIT(INTERNAL_ID, SEC_UNITS) VALUES (?, ?)”. "
    (17004) Invalid column type"
    Invalid column type[/size]
    [/color]

    [FONT=Century Gothic][SIZE=3][/font]Not sure if the JDBC Adapter service would accept the Vector as input to java.lang.object.[/size]

    [SIZE=3]Your help will be highly appreciated.
    [/FONT][/COLOR][/size]


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 2.  RE: Insert VARRAY into Oracle Database using JDBC

    Posted Fri July 24, 2015 06:46 PM

    We have similar issue with Stored procedure,

    IS this issue resolved?

    Did you get any Java util to convert object to java.sql.struct?

    Thanks in advanced.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 3.  RE: Insert VARRAY into Oracle Database using JDBC

    Posted Sat July 25, 2015 06:48 AM

    Your JDBC adapter is lacking fix level. What is your current installed fix level?


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods