Forum Discussion

arvndv's avatar
arvndv
Occasional Contributor
5 years ago
Solved

ReadyAPI 2.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

Getting below error while trying to connect to database from SoapUI Pro. 

Complete Error Descr:- 

"Failed to initialize the connection that uses the [oracle.jdbc.driver.OracleDriver] driver. Connection string: [jdbc:oracle:thin:<username>/<password>@//<hostname>:<port>/<servicename>]."

Please Note:-

* Connection working fine with above string in the same client for SoapUI 5.3.x

* Connection working fine in SQL Developer

* Connection errors only in SoapUI Pro

* JDBC Jar Files were copied under '.../Program Files\SmartBear\ReadyAPI-2.3.0\lib' folder

* The lib folder has both ojdbc6.jar and ojdbc7.jar files

* Connection String uses Service name

 

Did I do anything wrong or missing something ?

 

Please let me know if you need any further information.

  • richie 

    Thank you for your sincere and detailed responses. Finally, I am able to resolve the problem. 

    Seems ReadyAPI installs both 32-bit and 64-bit versions in the machine, I didn't know that I am acutally using the 32-bit version. Apparently the folder is different for the 32-bit version. It worked after I copied the files there.

    :)

7 Replies

  • richie's avatar
    richie
    Community Hero

    Hey arvndv 

     

    you saved the .jar files in * JDBC Jar Files were copied under '...\Program Files\SmartBear\ReadyAPI-2.3.0\lib' folder - right?

     

    yeah thats the wrong directory if memory serves - I'm typing this out on someone else's laptop who doesnt have ReadyAPI! installed - but I'm pretty sure my driver .jar files go in bin\ext instead

     

    Save in \Program Files\SmartBear\ReadyAPI-2.3.0\bin\ext instead

     

    Restart ReadyAPI! and I think that should do it

     

    Cheers,

     

    richie

    • arvndv's avatar
      arvndv
      Occasional Contributor

      Hi richie

      Thanks for your inputs. I tried, copied the files to bin/ext Restared app and then the machine. Still no luck.

      Still giving me the same error.

      • richie's avatar
        richie
        Community Hero
        Hi arvndv,

        Ok. I have a couple more suggestions.

        I double checked, you definitely had the .jar files in the wrong directory....i do have .jar files in my /lib directory, but the db connection driver .jars go in the bin/ext directory.

        You say you can connect to the db via sql developer. Have you got oracle client installed at all? Cos if you have it'll use the tnsnames.ora file by default despite attempting to setup connection via the thin driver....or at least that was the way it worked about 5 years ago (last time i was using oracle). Setup connection with db visualiser...that definitely only supports thin client oracle driver.

        Can you investigate the connection string? I had to setup a new connection for a MIMER RDBMS and the connection string i had to use deviated very slightly from the published documentation...this is a longshot...but still worth checking.

        The failed to initialise leads me to believe its either the drivers (which youve confirmed is in the correct directory now, so shouldnt be a problem) or the connection string. There was a recent post about 2 weeks ago cos the author couldnt connect once the oracle had been setup clustered using service name, rather than the old SID....have a think about this, there might be a problem with the service name parameter in your connection string.


        You mention the db connection works on soapui v5.3.0 is this on the same machine as readyapi!? Or on a separate machine? If its on a separate machine, best way to check if it is readyapi! or your settings is install soapui free on the same machine you have readyapi!
        Setup the db connection that you have configured on the machine with soapui 5.3.0 in the latest free soapui instance (same machine as readyapi!). Reproduce the config from the other soapui machine in the newly installed soapui. Can you connect?
        Finally, you mentiom readyapi! v2.3.0. Try upgrading and reconnecting....id upgrade sequentially and id only try this after all other avenues were attempted....especially if theres a reason you havent already upgraded from v2.3.0

        Ok...thats the ideas from me,

        Cheers,

        Richie