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

JDBC 6.0.3 adapter service not working inside Flow Service

  • 1.  JDBC 6.0.3 adapter service not working inside Flow Service

    Posted Fri August 04, 2006 02:36 AM

    Hello,

    I am having a weird problem with JDBC adapter 6.0.3,

    Env. details:

    wM 6.1 IS_6-1_FP2, IS_6-1_SP1 (O/S : Windows 2003) both wM and Adapter

    Adapter details and Connection properties:

    JDBC 6.0.3
    DataSource Class : com.ibm.db2.jcc.DB2DataSource
    Transaction Type : LOCAL_TRANSACTION
    Other Properties driverType=4

    Database details:

    Database : DB2 - UDB 8.1 (O/S : AIX 5.3)

    I have a Adapter Service - CustomSQL for SELECT operation, which outputs number of records for a particular WHERE clause. This adapter service works nicely and produces correct output when testing seperately.

    But, the same adapter service when used in Flow Service does not produce any result. It returns No Records i.e, count as 0.

    SQL:

    SELECT count(*) FROM facility where failicty_id = ? AND tc_company_id = ?

    JDBC Input Type Input Field Type Input Field

    VARCHAR java.lang.String facility_id
    INTEGER java.lang.String tc_company_id

    JDBC Output Type Output Field Type Output Field

    Integer java.lang.String RecordCount

    What funny here is, when I HARD-CODE the field tc_company_id inside flow service, it returns correct result. Whereas, when this field is mapped from a Input field (of String datatype) within flow, adapter service executes and return 0 records.

    I tried various combinations before passing to adapter service like trimming input value, converting String to Integer.

    I have issues only with the field which is of INTEGER datatype.

    Could anyone provide some hint or suggestion in solving this. I would greatly appreciate it.

    Thanks,
    Siva


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


  • 2.  RE: JDBC 6.0.3 adapter service not working inside Flow Service

    Posted Fri August 04, 2006 05:36 PM

    Siva,

    Just in dark,did you tried also with trimming the (tc_company_id) in your AS select statement??

    HTH,
    RMG


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


  • 3.  RE: JDBC 6.0.3 adapter service not working inside Flow Service

    Posted Fri August 04, 2006 06:51 PM

    RMG,
    Tried using TRIM in sql statment, but webMethods generates runtime error when included in WHERE clause.

    SELECT count(*) FROM facility WHERE facility_id = ? AND tc_company_id = (TRIM (?))

    also tried this combination,
    SELECT count(*) FROM facility WHERE facility_id = ? AND tc_company_id = LENGTH (TRIM (?)) = 8

    Any idea, please

    Thanks,
    Siva


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


  • 4.  RE: JDBC 6.0.3 adapter service not working inside Flow Service

    Posted Mon August 07, 2006 01:27 AM

    I’m guessing that your Flow is trying to map a string variable to an object variable with Integer constraints. The Map won’t work. Change the input variable for this field in your JDBC adapter service to String and all will be well with the world.

    Mark


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