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: [jdbcracle: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.
Solved! Go to Solution.
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.
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
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.
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 -
jdbcracle:thin:<USER>/<PASSWORD>@//<HOST:127.0.0.1>:<PORT:1521>/<SID>
Try upgrading and reconnecting
Ans: Sorry cant do upgrade now.
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
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.
hahahahaha!
yeah - the files being in the wrong directory will do that!
glad you sorted it!
Cheers,
richie
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
Subject | Author | Latest Post |
---|---|---|