cancel
Showing results for 
Search instead for 
Did you mean: 

DB Connection Issues

SOLVED
Highlighted
Frequent Visitor

DB Connection Issues

I'm facing issues in connecting to Oracle DB through Soap UI- Ready Api. It used to work for me earlier, somehow when I changed my machine, my scripts started failing .I tried connecting to DB using below two methods and with each of them I'm facing a different error:

Method 1- Mentioned the right connection String using this format - jdbc:oracle:thin:<USER>/<PASSWORD>@<HOST:127.0.0.1>:<PORT>/<ServiceName>

Error- Can't get the Connection for specified properties; java.sql.SQLException: ORA-28040: No matching authentication protocol.

I have tried all combinations of ojdbc drivers to resolve this. But nothing helped. Curretnly I have placed ojdbc6 

 

Method 2- Using Groovy script:

[‎23-‎07-‎2019 23:12]  Chatterjee, Sujoy (GE Healthcare): 

import groovy.sql.Sql

 

def dbUrl      = "jdbc:Postgresql://localhost/test-db"

def dbUser     = "test"

def dbPassword = "test"

def dbDriver   = "org.postgresql.Driver"

 

def sql = Sql.newInstance(dbUrl, dbUser, dbPassword, dbDriver)

 

Using this throws an error - java.sql.SQLException:No Suitable driver found for HOST error at line 12

 

 

Please help! It has been 3 weeks that I have been struggling with these issues

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: DB Connection Issues

Hi @ananya,

You are getting two different error responses because youre trying to connect to two different RDBMSs....oracle and postgresql.

Regarding method 1 error response. Your error appears to be for an oracle RDBMS and the error response is generated if you have the wrong jdbc.jar file version. What version of oracle are you connecting to? You need to ensure your driver version matches the java version installed and the RDBMS version

Regarding method 2 error. It appears you are using a postgresql RDBMS, and the error response appears to be when you havent got a jdbc driver .jar file for a postgresql RDBMS. You need to copy the postgresql driver file to the correct directory.

BTW. regarding installed java versions. You need to ensure you use the correct "bit version"...either x86 or 64bit java (which needs to correspond to your ReadyAPI! version) and this needs to correspond to your .jar driver files also.

Cheers,

Rich
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 Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Re: DB Connection Issues

Hi @ananya,

You are getting two different error responses because youre trying to connect to two different RDBMSs....oracle and postgresql.

Regarding method 1 error response. Your error appears to be for an oracle RDBMS and the error response is generated if you have the wrong jdbc.jar file version. What version of oracle are you connecting to? You need to ensure your driver version matches the java version installed and the RDBMS version

Regarding method 2 error. It appears you are using a postgresql RDBMS, and the error response appears to be when you havent got a jdbc driver .jar file for a postgresql RDBMS. You need to copy the postgresql driver file to the correct directory.

BTW. regarding installed java versions. You need to ensure you use the correct "bit version"...either x86 or 64bit java (which needs to correspond to your ReadyAPI! version) and this needs to correspond to your .jar driver files also.

Cheers,

Rich
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 Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

Community Manager

Re: DB Connection Issues

Great reply richie!

 

@ananya , hi! Did you get the chance to try what richie is suggesting? What is your result?


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors