Forum Discussion

Dymitr's avatar
Dymitr
New Contributor
3 years ago

Data Source Properties doesn't populate with information from SQL query

Hi,

I am currently using Ready API 3.10.1.

I want to retrieve information from Oracle DB with "Data Source" test step and pass value to the property.

I did next steps:

1."ojdbc8.jar" file was added to <installationFolder>\bin\ext.

2.JDBC configuration window - I chose "OracleThin/oracle.jdbc.driver.OracleDriver" and filled out all necessary fields.

3. I have checked connection with button "Test the current connection" and got result "The connection has been tested successfully".

4. "Build a query" - I wrote a select to view and executed with max rows = 1

Second tab with result. This means, that the information from the Oracle DB was received and ReadyApi should have been passed this value to the property.

But when I execute my "Data Source" step, I get fields with empty result

Accordingly, my property gets the value "empty" and it's useless in the following steps.

My question is:

How I can configure the ReadyApi to populate "Data Source" property with information from Oracle DB?

 

P.S. I used the following tutorial: https://www.youtube.com/watch?v=8yTJYg8DxO8&ab_channel=SmartBear

 

  • Hi, Richie.

    Thank you for your answer, but my issue was related with other things.

     

    I have read other sources and found the article.
    It says that you should add orai18n.jar to your classpath. This is related to the NLS parameters. I found this file in oracle maven repository and put it to the <installationFolder>\bin\ext.
    And property populate correctly. Next step of my test flow has got the value from data source variable.

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    Do you get different result when the same query is executed from different tool?

    • richie's avatar
      richie
      Community Hero
      Hey Dymitr,

      I cant try and replicate this on mine cos i havent got a working db connecrion, but the fact that when you run the query manually means theres nothing wrong with the connection string/drivers/jre version etc.

      Youve done exactly what i wouldve done (excepting building your query with the generator, its been problematic so i always just type in the query instead).

      I have 2 points....both are total guesses

      Im thinking theres either a problem with the property extraction (possible defect....i remember someone posting about 9 months ago about they were struggling to use properties in JDBC steps, so we had to use a workaround to sort it out WITHOUT using the properties)

      Or. I noticed that your table names include a $ sign. This "might" be causing problems cos ReadyAPI typically considers strings following $ signs as parameters.

      If you explain exactly what youre trying to do, i'll get my DB connection setup and i'll try and dig out the workaround to avoid using properties in JDBC steps.

      Cheers

      Rich

      • Dymitr's avatar
        Dymitr
        New Contributor

        Hi, Richie.

        Thank you for your answer, but my issue was related with other things.

         

        I have read other sources and found the article.
        It says that you should add orai18n.jar to your classpath. This is related to the NLS parameters. I found this file in oracle maven repository and put it to the <installationFolder>\bin\ext.
        And property populate correctly. Next step of my test flow has got the value from data source variable.

    • Dymitr's avatar
      Dymitr
      New Contributor

      Dear nmao,

      Information from the Oracle DB was received and ReadyApi should have been passed this value to the properties. But in my case property is empty.

      My variable has a NULL value

      Like ${Data Source#V$IFOBS_TRANSACTIONS_ID} = ''