Forum Discussion

canpan14's avatar
canpan14
Occasional Contributor
9 years ago

Cannot Connect to Oracle RDB Database

I'm trying to connect to an Oracle RDB Database which is not one of the listed databases.

I have the driver for it and put it in the bin/ext folder. After trying to fill out the information in JDBC Drivers Properties I tried a number of ways to connect to it but with no luck.

 

I'm looking for guidance as this is the first time I've tried to connect to a database type that wasn't listed as one of the defaults. Is there a specific way I need to enter the Driver name on the JDBC Drivers Properties page? I tried just using the name, the file name, the exact file path, but none worked.

 

Currently this is the error I'm getting no matter what I try.


 

Any help would be appreciated.

  • canpan14's avatar
    canpan14
    9 years ago

    Got it to work with:

     

    import  oracle.jdbc.driver.OracleDriver
    import groovy.sql.Sql
    
    com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.rdb.jdbc.rdbThin.Driver")
    sql = Sql.newInstance("jdbc:rdbThin://servername:port/dbname","username","password")
    def query = "select * from table"
    def res = sql.rows(query)
    
    log.info res[0]

    Looks like I needed the register JdbcDriver part for it to work properly!

  • canpan14

     

    Please provide below details,

    a) soapUI version

    b)connection string

    c)does your password contain "@" symbol

     

    or try the below groovy code and check 

     

    import  oracle.jdbc.driver.OracleDriver

    import groovy.sql.Sql

    sql = Sql.newInstance( "jdbc:oracle:thin:@IPAddress/dbName",userName,pwd)

    def query = "select * from plksddkd"

    def res = sql.rows(query)

     

     

     

    • canpan14's avatar
      canpan14
      Occasional Contributor

      Got it to work with:

       

      import  oracle.jdbc.driver.OracleDriver
      import groovy.sql.Sql
      
      com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.rdb.jdbc.rdbThin.Driver")
      sql = Sql.newInstance("jdbc:rdbThin://servername:port/dbname","username","password")
      def query = "select * from table"
      def res = sql.rows(query)
      
      log.info res[0]

      Looks like I needed the register JdbcDriver part for it to work properly!

    • canpan14's avatar
      canpan14
      Occasional Contributor

      Sorry for the late reply,

       

      a) SoapUI Pro 5.1.2 (I also have ReadyAPI 1.8 if needed)

      b) jdbc:rdbThin://server:port/dbname?user=user&passsword=PASS_VALUE

      - I'm not using the actual server or db name here to security reasons. If they are really needed I can send through PM

      -Also 

      c) My password does not contain an '@' symbol

       

      Error I get when trying the code: