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.
Solved! Go to Solution.
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!
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)
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:
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!
Subject | Author | Latest Post |
---|---|---|