AnsweredAssumed Answered

Unable to call Stored Procedure via Perform JDBC Query Assertion

Question asked by jeff.nibler on Aug 17, 2017
Latest reply on Feb 21, 2019 by PhBrand

Running GW 9.2. I have an additional database I created on the GW's existing MySQL instance. I have a stored procedure in MySQL. It takes 5 input parameters. No output parameters. When I SSH into the GW and go into MySQL, I can call the stored procedure successfully. Whenever I try to call it in the GW, I get the error: "Query testing failed: Bad SQL Grammar: Function/Procedure does not exist or incorrect number of arguments for CheckAccess; expected 0 got 5." Then it goes on to show me the query that was generated, and the query looks perfect. I copy paste that same query into MySQL at the command line directly on the GW and it works perfectly. 


This is what I have in the perform JDBC SQL Query Textbox:

CALL CheckAccess 'https', '', 8443, '/HelloWorld', ''


I've tried it with parenthesis as well - still doesn't work.

CALL CheckAccess ('https', 'xx***', 8443, '/HelloWorld', '')


I have verified that I'm using the correct JDBC connection to my custom DB. 


I SSH into the GW, then at the command line I perform the following (note that I go into mysql command line as the exact same user that I have configured in my JDBC Connection):

mysql --user=TheUsernameInMyJdbcConnection --password TheDBNameInMyJdbcConnection

CALL CheckAccess ('https', 'xx***', 8443, '/HelloWorld', '');


I get a successful response at the command line. 


I am not using context variables for the values shown in the above calls (yet). I need to get it working with literals first. 


I do not have the "convert variables to strings" checkbox checked, if it matters.