JDBC 6.0.3 adapter service not working inside Flow Service

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

Siva,

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

HTH,
RMG

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

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