Forum Discussion

Chiam_c's avatar
Chiam_c
Occasional Contributor
8 years ago

sql query works in toad but not in ready api

Admitedly i dont know why this is not working but i have happened upon an odd issue.

 

I have a rather long sql query that works fine in toad but throws a null pointer exception when running in  ready api (1.7.0 Soapui NG pro) . 

 

I know what your thinking its a null pointer, but i should also add that the query works just fine when i run it from the build query screen in the jbdc test step.  Below you will find the query that i am attempting to run.  The connection tests fine and all other queries to the database run fine.  The exact error states :   SQL Query - Plus1 Accociated Device: Error getting response; java.lang.NullPointerException  

 

anyone have any clues what is going on? is this a limitation of ready api (number of char on a single line string?) , or am i hitting a bug?

 

SELECT
'r << TOK 1' || chr(10) ||
'0 PIN_FLD_POID POID [0] 0.0.0.1 /device/num ' || TO_DEVICE.POID_ID0 || chr(10) ||
'0 PIN_FLD_STATE_ID INT [0] 1' || chr(10) ||
'TOK' || chr(10) || 'xop PCM_OP_WRITE_FLDS 0 1' || chr(10) ||
'r << XX 1' || chr(10) ||
'0 PIN_FLD_POID POID [0] 0.0.0.1 /device/num ' || FROM_DEVICE.POID_ID0 || chr(10) ||
'0 PIN_FLD_SERVICES ARRAY [0] allocated 20, used 1' || chr(10) ||
'1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/telco/iri_tel ' || DS.SERVICE_OBJ_ID0 || chr(10) ||
'1 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account ' || DS.ACCOUNT_OBJ_ID0 || chr(10) ||
'0 PIN_FLD_PROGRAM_NAME STR [0] "BillingOps Device Associate"' || chr(10) ||
'0 PIN_FLD_FLAGS INT [0] 0' || chr(10) ||
'XX' || chr(10) || 'xop PCM_OP_DEVICE_ASSOCIATE 0 1' || chr(10) ||
'r << XX 1' || chr(10) ||
'0 PIN_FLD_POID POID [0] 0.0.0.1 /device/num ' || TO_DEVICE.POID_ID0 || chr(10) ||
'0 PIN_FLD_SERVICES ARRAY [0] allocated 20, used 1' || chr(10) ||
'1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/telco/iri_tel ' || DS.SERVICE_OBJ_ID0 || chr(10) ||
'1 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account ' || DS.SERVICE_OBJ_ID0 || chr(10) ||
'0 PIN_FLD_PROGRAM_NAME STR [0] "BillingOps Device Associate"' || chr(10) ||
'0 PIN_FLD_FLAGS INT [0] 1' || chr(10) ||
'XX' || chr(10) || 'xop PCM_OP_DEVICE_ASSOCIATE 0 1' || chr(10)
FROM PIN.DEVICE_T FROM_DEVICE, PIN.DEVICE_T TO_DEVICE, PIN.DEVICE_SERVICES_T DS
WHERE FROM_DEVICE.POID_ID0 = DS.OBJ_ID0
AND FROM_DEVICE.DEVICE_ID = 'xxxx' <- this is retrieved from a data source but i have tried a real number
AND TO_DEVICE.DEVICE_ID = 'yyyy'  <- this is retrieved from a data source but i have tried a real number