cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Occasional Contributor

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: [jdbcSmiley Surprisedracle: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.

1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

@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.

Smiley Happy

7 REPLIES 7
Community Hero

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

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

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 title of the post to something more descriptive? This will help people when searching for problems.
Occasional Contributor

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

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.

Community Hero

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

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
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 title of the post to something more descriptive? This will help people when searching for problems.
Occasional Contributor

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

You say you can connect to the db via sql developer. Have you got oracle client installed at all?
Ans: Yes

 if you have it'll use the tnsnames.ora file by default despite attempting to setup connection via the thin driver
Ans: Sorry, don't get this part. Should I be using a different conn string format then?

Setup connection with db visualiser -
Ans: Are you referring to the "configure" window in SoapUI? If this is a new software, sorry, I am not allowed to do that without proper business justification.

You mention the db connection works on soapui v5.3.0 is this on the same machine as readyapi!? Or on a separate machine?
Ans: Same Machine. Using Conn String format -
jdbcSmiley Surprisedracle:thin:<USER>/<PASSWORD>@//<HOST:127.0.0.1>:<PORT:1521>/<SID>

Try upgrading and reconnecting
Ans: Sorry cant do upgrade now.

Community Hero

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

Hi @arvndv 

 

The reason why I asked if you have Oracle client installed is because Oracle client software uses a file called tnsnames.ora to create and configure database connections.  Quite often if you install some software to interrogate the oracle database (like SQLDeveloper etc.), the software will use the db connection defined in the tnsnames.ora file rather than use Oracle's thin driver (the JDBC connection string option) and you'll think your using the JDBC connection string - but in fact the software uses the tnsnames.ora file.

Admittedly this was about 5 years ago - perhaps things have changed since I last used Oracle.

 

DBVisualiser is a DB interrogation tool that cannot use Oracle's tnsnames.ora file (or at least it couldn't 5 years ago) - if you could connect to the same db via DBVisualiser it would confirm the problem was with ReadyAPI! config.

 

Unfortunately I didn't read your original post properly.  You already have a soapui instance on the same machine as your readyapi! machine and you can connect to the database fine with soapui.

 

I did come across this about 3 months ago with SQLServer - I could connect to the DB using SoapUI (windows authentication) fine - but ReadyAPI! couldn't connect (using the windows authentication) - despite using the correct drivers etc.

I had to change the authentication to SQLAuthentication instead before it connected but that doesn't solve your problem.

 

I've noticed when setting up db connections for certain databases in soapui - I've had to add in a new connection string as the default connection string doesn't always do what is necessary.  i.e. your database instance might need some extra parameters that aren't represented in the default connection string.

 

have a look at the following link

 

cheers,

 

richie

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 title of the post to something more descriptive? This will help people when searching for problems.
Occasional Contributor

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

@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.

Smiley Happy

Community Hero

Re: ReadyAPI 5.3 Oracle JDBC Fails to Initiate in Data Source and/or JDBC Request

hahahahaha! Smiley HappySmiley HappySmiley HappySmiley Happy

 

yeah - the files being in the wrong directory will do that!

 

glad you sorted it!

 

Cheers,

 

richie

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 title of the post to something more descriptive? This will help people when searching for problems.
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors