Ask a Question

My first Groovy SQL script in SoapUI - connection string

Occasional Contributor

My first Groovy SQL script in SoapUI - connection string

I got my hands on "Groovy in Action" and have been trying to follow the example in the book for connecting to a database. So far, here's my script (I ahve modified server, username, and password info of course):

import groovy.sql.Sql
db = Sql.newInstance('jdbc:oracle:thin:@server:1604:a237', 'username', 'password', 'oracle.jdbc.OracleDriver')

When I run the script, though, I get an error
Tue Dec 11 14:27:18 MST 2007:ERROR:java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

I followed the user documentation and 1) made sure there was a load command in the groovy-starter.conf file and 2) dropped the Oracle SQL .jar file into the Groovy lib folder.

Any help getting this going would be much appreciated. Niclas has been great--I'm pushing ahead through data-driven tests with his help and this is one of the last steps to my initial test suites.


John O.
Super Contributor

Hi John,

you need to put the oracle jar in the soapui\bin\ext folder, then make sure that it gets picked up by soapUI when restarting; the soapui log will contain a row looking somewhat like:

22:46:30,641 INFO  [SoapUI] Added [file:/C:/workspace/soapui-pro/ext/XXX.jar] to classpath

Hope this helps!


Occasional Contributor

Ole thanks. This got me running!
Showing results for 
Search instead for 
Did you mean: