Null pointer Exception -Execute Stored Procedure

Hi All,



I am trying to use "Execute Stored Procedure" smart service to invoke a stored procedure in the DB.

But when i try to execute the process it gives me following error alert.

"There is a problem with task “Execute Stored Procedure” in the process “TestProcessModel”. java.lang.NullPointerException"

Here are the values that i am passing to the smart service.



Data Source Name="jdbc/MSFT_RSU"

Procedure Name=="sp_ListBooks"

title_search="fun"

total_cost=0

resultSet1 (this is of type cdt to this and saving into the same for output from smart service)



But when we try to user alternate approach, specified



= with(

local!spResult: fn!executestoredprocedure( "jdbc/MSFT_RSU",

"sp_ListBooks",

{

{

name: "title_search",

value: "Fun"

}

}

...

OriginalPostID-253249

  Discussion posts and replies are publicly visible

Parents
  • As per my understanding, the activity class parameters should have the name same as the parameters in procedure. In this case I declared an AC parameter(resultSet1) which is not defined in procedure at all. Actually procedure returning 'total_cost' only.
                        so I deleted resultSet1 parameter from node inputs section. I hope it helps
Reply
  • As per my understanding, the activity class parameters should have the name same as the parameters in procedure. In this case I declared an AC parameter(resultSet1) which is not defined in procedure at all. Actually procedure returning 'total_cost' only.
                        so I deleted resultSet1 parameter from node inputs section. I hope it helps
Children
  • When I try the Execute Stored Procedure smart service in my process model, I get a "java.lang.NullPointerException" error. No further information to why this error is returned. The stored procedure was tested successfully on SQL Server has one varchar(200) input and Integer output. We are using an Appian 18.4.. I have one input and one output. As SQL Server treats the IN-OUT (as it did when I tested outside of SSMS; SQLCMD command line call), I treated the OUT parameter as IN-OUT with input variable name same as SP parameter with "Save Into" process variable. I even tried setting up output parameter with ACP saving into process variable. Didnt help either. Please help....

    PS: as noted by @nellurus, i am not using resultSet1 parameter.