Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

toracleSP returning a sys_refcursor

Hi,

 

I've used tOracleSP to return values successfully before but i'm strugging to get it to work when the OUT parameter is of sys_refcursor type.

 

This is just a dummy route I've created to test but the flow is

 

tFixedInputFlow-->tMap-->tOracleSP-->tParseRecord-->tLogRow

 

The Oracle stored procedure is a simple test harness, i pass in a string and it returns a cursor with 2 string values

 

PROCEDURE cursor_test (

par_test_in IN VARCHAR2,

par_testcur_out OUT SYS_REFCURSOR

) IS

BEGIN

OPEN par_testcur_out FOR

SELECT 'test1' as VALUE1, 'test2' as VALUE2

FROM DUAL;

END cursor_test;

 

At present the cursor is configured as a RECORD SET in tOracleSP and an Object datatype in tMap, tOracleSP and tParseRecord (see attached pic for configurations)

 

I'm getting a NullPointerException

 

Starting job TempDI at 14:38 06/12/2018. [statistics] connecting to socket on port 3610 [statistics] connected Exception in component tOracleSP_2 (TempDI) java.lang.NullPointerException at decisionengine.tempdi_0_1.TempDI.tFixedFlowInput_2Process(TempDI.java:2421) at decisionengine.tempdi_0_1.TempDI.runJobInTOS(TempDI.java:3854) at decisionengine.tempdi_0_1.TempDI.main(TempDI.java:3429) [FATAL]: decisionengine.tempdi_0_1.TempDI - tOracleSP_2 null java.lang.NullPointerException at decisionengine.tempdi_0_1.TempDI.tFixedFlowInput_2Process(TempDI.java:2421) at decisionengine.tempdi_0_1.TempDI.runJobInTOS(TempDI.java:3854) at decisionengine.tempdi_0_1.TempDI.main(TempDI.java:3429) .

 

-----------------------------------------. | #1. tLogRow_3--ERROR

| +--------+--------------------------------+

| key | value

| +--------+--------------------------------+

| errmsg | java.lang.NullPointerException

| +--------+--------------------------------+

 

[statistics] disconnected Job TempDI ended at 14:38 06/12/2018. [exit code=0]

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

Are your configuration correct?

Could you please post your tOracleSP component setting screenshot on forum?

Best regards

Sabrina

 

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hello,

Are your configuration correct?

Could you please post your tOracleSP component setting screenshot on forum?

Best regards

Sabrina

 

Anonymous
Not applicable
Author

Hi Sabrina,

 

Embarrassingly, even though i'd checked and double checked one of the fields was not set to Object data type on the tOracleSP. Thanks for your help. 

Anonymous
Not applicable
Author

Hello,

Feel free to post your any issue on community. Many hands make work light!

Best regards

Sabrina