cancel
Showing results for 
Search instead for 
Did you mean: 

Parametrized JDBC broken in Ready API 3.1

SOLVED
Highlighted
New Contributor

Parametrized JDBC broken in Ready API 3.1

I am using JDBC Test Step in SoapUI to select data from an Oracle database. My sql statement contains parameters and looks something like this:

select ID
from MY_TABLE
where REF_ID = :ref_id
order by UPDATED_AT desc
fetch first 1 rows only

The query contains ref_id parameter. I have defined the parameter in the configuration of the test step with valid value.

 

In Ready API 3.0 this worked fine. After update to Ready API 3.1 this does not work anymore. I am getting this error:

2020-02-19 10:10:46.912 - Error getting response; java.sql.SQLException: Missing IN or OUT parameter at index:: 1

When I replace the parameter in the query with specific value it works but I want to use parameters in my queries. 

 

One thing to note is that when I open the JDBC's Query Builder using the Build Query button and I execute my query with parameters there it works as expected.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: Parametrized JDBC broken in Ready API 3.1

Hi @TwoFang @dejvid-smth , great new - this behaviour was fixed in the ReadtAPI 3.1.0 maintenance build.


Sonya Mihaljova
Community and Education Specialist

 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!

View solution in original post

6 REPLIES 6
Highlighted
Community Hero

Re: Parametrized JDBC broken in Ready API 3.1

Hi @dejvid-smth,

So your query worked in v3.0 but now doesnt for v3.1?

At this point id check the release notes for v3.1 to see if there are any related changes that have introduced a regression.

Once that is done, id raise a support ticket with Smartbear (sorry im typing this on my phone so i cant provide the link, but youll be able to find it without too much trouble) detailing the issue. This definitely sounds like a regression and is gonna break a lot of peoples tests so its likely Smartbear will try and fix this in a subsequent maintenance release.

In regards to the fact that the query executes fine in the QueryBuilder function, a couple of people have raised forum posts saying theyre struggling with thr jdbc step but using the QueryBuilder executes the query fine.

As a short term workaround, could you perhaps downgrade your ReadyAPI! version back down to v3.0 to get you up and running again until Smartbear can resolve the issue? (assuming theres nothing in the v3.1 release notes saying otherwise)

Hope this helps,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Community Hero

Re: Parametrized JDBC broken in Ready API 3.1

Hey @dejvid-smth ,

Ive just reread your post and so youre saying using sql defined parms in the JDBC step with the : identifier is failing, right?

In all my use of the JDBC step ive never bothered using the parms in the JDBC step this way (using the : identifier/alias).

Instead ive always used properties like ${Properties#attribute} (sourcing my parm values from values stored elsewhere (i.e. in a Properties step)) or via inline scripting ${=inlinescriptingtodynamicallygeneratethevalue}

Have you tried this approach rather than sql parms needing the :identifier syntax?

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
New Contributor

Re: Parametrized JDBC broken in Ready API 3.1

Hi @richie,

 

I have tried using the property references via Get Data and that works. Although even a simples use case with : parameter/alias doesn't. I can solve my problem with the property concatenation like you suggested but that is not the point. The parameters are there for a reason and if they don't work it is either a bug or the functionality should be removed Smiley Happy

Highlighted
Community Hero

Re: Parametrized JDBC broken in Ready API 3.1

Hi @dejvid-smth 

 

apologies - I thought you were looking for a workaround not just highlighting a possible issue.

 

Yeah - as I said before - best thing would be to raise a ticket with Smartbear so they're aware of the issue,

 

nice one,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Occasional Contributor

Re: Parametrized JDBC broken in Ready API 3.1

Have this issue as well and was wondering if there were a ticket posted so we can get it fixed?

Highlighted
Community Manager

Re: Parametrized JDBC broken in Ready API 3.1

Hi @TwoFang @dejvid-smth , great new - this behaviour was fixed in the ReadtAPI 3.1.0 maintenance build.


Sonya Mihaljova
Community and Education Specialist

 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!

View solution in original post