Forum Discussion

ananya's avatar
ananya
Frequent Visitor
6 years ago

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

 

  • 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
  • richie's avatar
    richie
    Community Hero
    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
    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Great reply richie!

       

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