Kevin_Mannering
14 years agoOccasional Contributor
SQL connection driver not found
Am running a groovy script as a test step from the green start button. The jdbc driver is not found. I have put it in lib and bin/ext
Dunno if soapui.bat runs or if SOAPUI_HOME is set or if this is set:
set JAVA_OPTS=%JAVA_OPTS% -Djava.library.path="%SOAPUI_HOME%\"
and I would certainly rtfm if I could find the fm.
So, is there an answer to this and is there any docu on soaupui-pro.bat, system properties, and jvbc connections generally?
have spent some time on this and fiddled around with every howto answer I could find on the forum.
We are running SOAPUI-PRO 4.0.1 (and have to stay there)
As far as I can see JAVA_HOME, JAVA_PATH, and CLASSPATH are not set as system variables or properties.
soapui.home etcetera is as follows:
soapui.ext.actions=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin/actions
soapui.ext.libraries=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin/ext
soapui.ext.listeners=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin/listeners
soapui.home=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin
soapui.properties=soapui.properties
Here is the code:
1 com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "net.sourceforge.jtds.jdbc.Driver" )
2 import groovy.sql.Sql
4 log.info "kevtest1"
6 def sql = Sql.newInstance("jdbc:jtds:sybase:://ourdatabase.de:portnr/test",
7 "user","userpassword","net.sourceforge.jtds.jdbc.Driver")
9 log.info "kevtest2"
11 sql.firstRow("select LKZ from vertrag..MEHRWERTSTEUER")
12 log.info ("test" + row.LKZ)
the script throws an error on line6
Tue Jul 17 16:19:51 CEST 2012:ERROR:An error occured [net.sourceforge.jtds.jdbc.Driver], see error log for details
The outputlog is this
Tue Jul 17 16:19:51 CEST 2012:INFO:kevtest1
The error log is here:
Tue Jul 17 16:19:51 CEST 2012:ERROR:java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at groovy.sql.Sql.loadDriver(Sql.java:483)
at groovy.sql.Sql.newInstance(Sql.java:305)
at groovy.sql.Sql$newInstance.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at Script5.run(Script5.groovy:6)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:88)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dunno if soapui.bat runs or if SOAPUI_HOME is set or if this is set:
set JAVA_OPTS=%JAVA_OPTS% -Djava.library.path="%SOAPUI_HOME%\"
and I would certainly rtfm if I could find the fm.
So, is there an answer to this and is there any docu on soaupui-pro.bat, system properties, and jvbc connections generally?
have spent some time on this and fiddled around with every howto answer I could find on the forum.
We are running SOAPUI-PRO 4.0.1 (and have to stay there)
As far as I can see JAVA_HOME, JAVA_PATH, and CLASSPATH are not set as system variables or properties.
soapui.home etcetera is as follows:
soapui.ext.actions=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin/actions
soapui.ext.libraries=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin/ext
soapui.ext.listeners=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin/listeners
soapui.home=C:\Program Files\SmartBear\soapUI-Pro-4.0.1/bin
soapui.properties=soapui.properties
Here is the code:
1 com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "net.sourceforge.jtds.jdbc.Driver" )
2 import groovy.sql.Sql
4 log.info "kevtest1"
6 def sql = Sql.newInstance("jdbc:jtds:sybase:://ourdatabase.de:portnr/test",
7 "user","userpassword","net.sourceforge.jtds.jdbc.Driver")
9 log.info "kevtest2"
11 sql.firstRow("select LKZ from vertrag..MEHRWERTSTEUER")
12 log.info ("test" + row.LKZ)
the script throws an error on line6
Tue Jul 17 16:19:51 CEST 2012:ERROR:An error occured [net.sourceforge.jtds.jdbc.Driver], see error log for details
The outputlog is this
Tue Jul 17 16:19:51 CEST 2012:INFO:kevtest1
The error log is here:
Tue Jul 17 16:19:51 CEST 2012:ERROR:java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at groovy.sql.Sql.loadDriver(Sql.java:483)
at groovy.sql.Sql.newInstance(Sql.java:305)
at groovy.sql.Sql$newInstance.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at Script5.run(Script5.groovy:6)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:88)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)