Forum Discussion
- ShashavaliContributor
try this
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def classpathHacker = new com.eviware.soapui.support.ClasspathHacker () log.info "utils=" + groovyUtils path = groovyUtils.getProjectPath() myfile = new java.io.File(path + "/ojdbc14.jar") mystring = "file://" + path + "/ojdbc14.jar" log.info "myfile=" + myfile classpathHacker.addFile( myfile ) com.eviware.soapui.support.ClasspathHacker.addFile( myfile ) com.eviware.soapui.support.ClasspathHacker.addURL( new URL(mystring) ) import groovy.sql.* def sql = groovy.sql.Sql.newInstance( db, userid, password, 'oracle.jdbc.driver.OracleDriver' )
- Mr_BroFrequent Contributor
i have tried this approach and im encountring the below error ,
java.io.IOException: Error, could not add URL to classloader jdk.internal.loader.ClassLoaders$PlatformClassLoader error
- ShashavaliContributor
looks like issue with the java version.
don't you have access SmartBear\SoapUI-5.6.0\bin\ext folder ?
- Mr_BroFrequent Contributor
the administrator has restricted access to any sub folder under C: drive.
is it possible to load the driver from any given file location?.
- nmraoChampion Level 3
If the above file is required, then I believe your system admin can fulfill your request, just please check.
Any user libraries placed under SOAPUI_HOME/bin/ext directory are loaded by the tool automatically.
- nmraoChampion Level 3If you still have issues loading the database driver library, you may placing the under SOAPUI_HOME/lib directory and restart the tool
Related Content
- 5 years ago
Recent Discussions
- 8 days ago