Forum Discussion

cata12's avatar
cata12
Contributor
7 years ago

JDBC connection not updated when I change the environment ?

Hi, I'm running Ready API 2.1.0 with a PRO license. I have 2 environments and tests that involve JDBC connections. It looks like when I change the environment, the JDBC connection is not updated accordingly. Has anyone faced this situation recently ?

Thanks

Catalin

7 Replies

  • avidCoder's avatar
    avidCoder
    Super Contributor

    Hi Catalin,

     

    Yes, its a known issue.. There was a ticket raised for this earlier.. The solution I could give is:-

     

    Create one JDBC Connection. Create as many environments as you want. Now in the environment tab, select the environment you want to configure, select the single JDBC connection, click "Configures the selection data connection".

     

    Now you are configuring the DB connection for the environment you selected. After you are done with that connection, select other environment, and repeat the JDBC configuration process.

     

    After you all done, if you select different environment, you shall see the JDBC configurations will be different from environment to environment even you have only one line of JDBC connection (the values, like driver and connections string, for that connection will change from environment to environment)

     

    This feature is a bit confusing. Hope this solution helps you out. :)

     

    Regards,

    Ashutosh.

    • cata12's avatar
      cata12
      Contributor

      Hi ashutoshanshu and thanks for sharing the info.

       

      This seems to be working. I'm just curious if the Jenkins job would know the difference when I select the environment.

       

      Regards

      Catalin

  • Now I see duplicate JDBC connections in Environments editor. When I select first environment I see duplicate connections, even DB from the second environment. Same for the second one. How can I delete the duplicates ?

    • cata12's avatar
      cata12
      Contributor

      I fixed this from the settings.xml file by removing the duplicate connections. Still, the DB connection is not updated in the JDBC request drop down (under CONNECTION).