max1965
13 years agoContributor
problem with jdbc access to oracle DB
I have the following problem with a jdbc access to oracle database; I am using the following groovy script:
import groovy.sql.Sql;
import oracle.jdbc.driver.OracleDriver;
import java.security.MessageDigest
def digest = MessageDigest.getInstance("MD5")
def sql = Sql.newInstance('jdbc:oracle:thin:@138.132.38.205:1528:UDB01', 'UDB', 'UDB','oracle.jdbc.driver.OracleDriver');
'oracle.jdbc.driver.OracleDriver');
sql.eachRow("SELECT * from udb_usr_profile_t where pubiden='04283300000'"){ sipkey = it.pwd}
log.info sipkey
When I execute the script, I have the following error:
Tue Mar 26 12:01:14 CET 2013:ERROR:java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@138.132.38.205:1528:UDB01
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@138.132.38.205:1528:UDB01
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at groovy.sql.Sql.newInstance(Sql.java:285)
at groovy.sql.Sql.newInstance(Sql.java:306)
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 Script1.run(Script1.groovy:5)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
In the testCase I added a JDBC Request step; after I execute only the TestConnection operation from the JDBC Request step, the groovy script works correctly.
import groovy.sql.Sql;
import oracle.jdbc.driver.OracleDriver;
import java.security.MessageDigest
def digest = MessageDigest.getInstance("MD5")
def sql = Sql.newInstance('jdbc:oracle:thin:@138.132.38.205:1528:UDB01', 'UDB', 'UDB','oracle.jdbc.driver.OracleDriver');
'oracle.jdbc.driver.OracleDriver');
sql.eachRow("SELECT * from udb_usr_profile_t where pubiden='04283300000'"){ sipkey = it.pwd}
log.info sipkey
When I execute the script, I have the following error:
Tue Mar 26 12:01:14 CET 2013:ERROR:java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@138.132.38.205:1528:UDB01
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@138.132.38.205:1528:UDB01
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at groovy.sql.Sql.newInstance(Sql.java:285)
at groovy.sql.Sql.newInstance(Sql.java:306)
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 Script1.run(Script1.groovy:5)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
In the testCase I added a JDBC Request step; after I execute only the TestConnection operation from the JDBC Request step, the groovy script works correctly.