Forum Discussion

Neustar's avatar
Neustar
Occasional Contributor
15 years ago

groovy jdbc connection fails in 3.6.1 but works in 3.6

I am using groovy sql call in SoapUIPro 3.6:
sql = Sql.newInstance(url,user,pass,driver);

the driver Im using is: oracle.jdbc.driver.OracleDriver., and connection string is: jdbc:oracle:thin:user/pass@host:port:sid
I have the ojdbc.jar sourced in correctly and this call works fine in Pro 3.6. but this same call fails in Pro 3.6.1 even though I have the same jar defined there too (i can see in soapui.log the jar being loaded). the error i get in 3.6.1 is "no suitable driver found....".
Also, the JDBC module of SoapUI Pro works fine in both version with same driver.

1 Reply

  • Hello,

    In soapUI 3.6.1 we made some changes to how certain classes are loaded, which unfortunately has this side effect... To fix the problem, you have two options. Either you add the following line to the beginning of any script where you need the driver:


    com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.jdbc.driver.OracleDriver")


    Or, if you have a lot of scripts and don't want to modify them all, you can alternatively move the driver jar file from the ext folder to the lib folder instead, and it should work. This won't work with our other load testing tool, loadUI, though. Because of this, I would recommend using the first approach. Good luck!

    Regards,
    Dain
    eviware.com